Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: appendChild & cloneNode appendChild & cloneNodeTo: NULL Date: 6/2/2009 12:36:00 AM The following code display a DIV#help with AJAX loaded XML inside.
It works fine in W3C Compliant Browsers but not in IE8.
The problem in IE8 appears in last line.
Is there an error in my code or an IE8 incompatibility?
Any workarounds?
Thanks
---------------------------------------------------------
function openHelp(a) {
var obj = document.getElementById('help');
obj.style.display = 'block';
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4)
innerDOM(obj, xmlHttp.responseXML.documentElement);
}
xmlHttp.open("GET", 'help.php/' + a, true);
xmlHttp.send(null);
}
function innerDOM(where, root) {
for (var z = 0; z < root.childNodes.length; z++)
where.appendChild(root.childNodes[z].cloneNode(true)); // <-- HERE IS
THE PROBLEM
}
--------------------------------------------------------------
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
