Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

I'm after some advice with one of my web pages. I currently look after a website for local karate group and one of my pages uses a bit of xml to build a table and populate the date. If i browse this page via Firefox or IE, it is fine, but on Chrome its blank :(

I cannot work out for the life of me why this is happening. Appreciate any assistance...

var xmlDoc=null;

if (window.ActiveXObject)

{// code for IE

xmlDoc=new ActiveXObject("Microsoft.XMLDOM");

MAKEUSEOF VIDEO OF THE DAY
SCROLL TO CONTINUE WITH CONTENT

}

else if (document.implementation.createDocument)

{// code for Mozilla, Firefox, Opera, etc.

xmlDoc=document.implementation.createDocument("","",null);

}

else

{

alert('Your browser cannot handle this script');

}

if (xmlDoc!=null)

{

xmlDoc.async=false;

xmlDoc.load("documents/gradings.xml");

var x=xmlDoc.getElementsByTagName("STUDENT");

document.write("");

document.write("");

document.write("NameGrade Passed");

document.write("");

document.write("");

document.write(xmlDoc.getElementsByTagName("MONTH")[0].childNodes[0].nodeValue);

document.write("");

for (var i=0;i

MakeUseOf TechGuy
2013-08-09 15:07:15
Solution here: http://chromespot.com/forum/google-chrome-troubleshooting/1063-xml-load-issue-javascript.htmlBut seriously, please rewrite that from scratch to use something more modern.
MakeUseOf TechGuy
2013-08-09 16:12:36
Keep dynamic information in a database if you can; PHP/MySQL is relatively easy. Otherwise, rewrite using jQuery and a suitable XML parser. Anything but ActiveX. jQuery XML: http://net.tutsplus.com/tutorials/javascript-ajax/use-jquery-to-retrieve-data-from-an-xml-file/
Bruce E
2013-08-09 01:22:58
Please zip/rar all of the associated files for the page (html, css, js, etc) required for the page and post it on a filesharing site so we can pick it up to analyze it.