C
Chameleon
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
}
--------------------------------------------------------------
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
}
--------------------------------------------------------------