I am trying to import a XML-file into a HTML document with Javascript.
It works fine for Firefox, but it doesn't work for IE-10 and Chrome.
My script:
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","xml_input.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
I think they changed the XMLHttpRequest again but I can't find it's replacement anywhere. I'm hoping someone on this site can help me.