Opened 15 years ago

Closed 15 years ago

#1796 closed defect (invalid)

Problem with innerHTML

Reported by: guest Owned by: bill
Priority: blocker Milestone:
Component: Widgets Version: 0.4
Keywords: Cc:
Blocked By: Blocking:


In the new version 0.4 there are a problem with the ownership 'innerHTML.' In practice it happens that if I want to load a treeview from a file xml in dynamic way a problem it is had, I suppose, of interpretation of a fragment HTML realized through a string. Following the code of example is brought:

function loadXML(url) {

if (document.implementation && document.implementation.createDocument) {

var xmldoc = document.implementation.createDocument("", "", null);

xmldoc.onload = function( ) {


} xmldoc.load(url);

} else if (window.ActiveXObject) {

var xmldoc = new ActiveXObject("Microsoft.XMLDOM"); Create doc

xmldoc.onreadystatechange = function( ) { Specify onload

if (xmldoc.readyState == 4)



xmldoc.load(url); Start loading!



function makeTreeview(xmldoc) {

var result = getContentFromXML(xmldoc); dojo.byId('tree').innerHTML = result; alert(dojo.byId('tree').innerHTML); Here the problem



The 'result' variable results correct syntactically when it is visualized with the function alert. This example perfectly works with the version 0.3.1.

Change History (1)

comment:1 Changed 15 years ago by bill

Resolution: invalid
Status: newclosed

The code above doesn't seem to have anything to do with dojo, except for calls to dojo.byId(). I doubt that's your problem, but if it is then can't you just use document.getElementById()? Sorry, this really doesn't look like a dojo issue.

Note: See TracTickets for help on using tickets.