#16888 closed defect (invalid)
innerHTML not function
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | General | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
<section id="insert"></section>
<script> require(["dojo/ready", "dojo/dom"], function(ready, dom) { ready(function() { var fragment = "<b>test<i>test</i></b>"; var node = dom.byId("insert"); node.innerHMTL = fragment; dom works document.getElementById("insert").innerHTML = fragment; console.log(node.innerHMTL); }); }); </script>
If I use console - breakpoint, and type first node.innerHMTL and then node.innerHMTL = value, it works. But this fake doesnt work in code.
Attachments (1)
Change History (9)
comment:1 Changed 9 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
Changed 9 years ago by
Attachment: | innerhtml.html added |
---|
comment:2 Changed 9 years ago by
Status: | pending → new |
---|
Attachment (innerhtml.html) added by ticket reporter.
comment:3 Changed 9 years ago by
I want insert HTML fragment into section element. Same as query and innerHTML method.
comment:4 Changed 9 years ago by
Status: | new → pending |
---|
It looks OK, except I guess that <section> elements won't work on older browsers. What browser are you running on, and what happens when you run the code?
comment:5 Changed 9 years ago by
Status: | pending → new |
---|
Chrome Version 25.0.1364.172 m. Going to check it on other browsers.
comment:6 Changed 9 years ago by
I have tested it in Opera and same problem. Nothing was inserted into section element. See only empty screen and you? Do you see the text text? I have tested it on 2 computers. One with Tomcat and one with Apache.
I have a problem with Tomcat server and require method too. See this link please. http://dojo-toolkit.33424.n3.nabble.com/Tomcat-and-require-td3994987.html
comment:7 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
OK. You spelled innerHTML wrong. You typed innerHMTL.
comment:8 Changed 9 years ago by
omg :-) I shame on myself. You have right. I am using different keyboards now and then make char mistakes and Copy paste finish it :-). Thanks for help.
I don't understand what you are saying. Use the "attach file" button to attach a full test case, and then list the expected results vs. the actual results.