Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Animation script not working in Chrome and Safari Re: Animation script not working in Chrome and Safari

#57854
antonv
Participant

I figured it out. I was all about the way chrome and safari do an http request. Here is the post that i found with the explanation: http://chromespot.com/showthread.php?t=1063

And here is the code change:
FireFox only:

Code:
var xmlDoc=document.implementation.createDocument(“”,” “,null);
xmlDoc.async = false;
xmlDoc.load(xmlsrc);

Chrome + FireFox:

Code:
var xmlhttp = new window.XMLHttpRequest();
xmlhttp.open(“GET”,xmlsrc,false);
xmlhttp.send(null);
var xmlDoc = xmlhttp.responseXML.documentElement;

Thanks,
Anton