I am facing an issue where the code is working on Safari but failing on other browsers, and I can't figure out why.
You can find the html part and the main javascript part.
The main issue at hand is:
When executing the function downloadurl(url, function)
, the XML tags "Info" cannot be found and the markers array length is 0 on many browsers. However, everything works fine on Safari. Here is a snippet of the javascript code:
downloadUrl("http://travel-taoyuan.tycg.gov.tw/content/travel/xmlcontentlist1.aspx", function(doc) {
var xml = xmlParse(doc);
var markers = xml.documentElement.getElementsByTagName("Info");
......
Attempting to alert markers results in "0". In reality, it should be "174" (as shown in Safari).
Thank you for your help in addressing my question.