hi there,
I'm currently working on a JavaScript that should import the values of one tag in an XML file into an array. It works fine on Internet Explorer, but not on Firefox I think it is because of the getElementsByTagName() function
this is the part of the script that processes the XML file
Code:
function XMLimport()
{
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("", "", null);
}
else if (window.ActiveXObject)
{
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
}
else
{
alert('Your browser can\'t handle this script');
return;
}
xmlDoc.load("artisttable.xml");
names = xmlDoc.getElementsByTagName('artist_name');
for(i=0;i<names.length;i++)
{
suggestarray[suggestarray.length]=dbformtoregular(names.item(i).text);
}
alert(suggestarray.length);
}
The alert at the end is just a check that I implemented while debugging on Internet explorer it says 277, on firefox 0
The complete script is 4 pages and I needed 2 days to get it working completely, it worked for both browsers until I tried to make the link with XML.
some help would be welcome
DragonEye