Hi,
I have been having problems getting my xml to load in all browsers. I have finally got it working in safari but now it is not working in IE. Has anyone got any solutions?
Thanks
function displayResult() {
var xmlRequest = new XMLHttpRequest();
xmlRequest.open("GET", document.getElementById('tracklisting').innerHTML, false);
xmlRequest.send(null);
xml= xmlRequest.responseXML;
var xslRequest = new XMLHttpRequest();
xslRequest.open("GET", document.getElementById('xslt').innerHTML, false);
xslRequest.send(null);
xsl = xslRequest.responseXML;
xsltProcessor=new XSLTProcessor();
xsltProcessor.importStylesheet(xsl);
resultDocument = xsltProcessor.transformToFragment(xml,document);
document.getElementById("example").appendChild(resultDocument);
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(displayResult);