Hey guys!
I have the following code for loading an external XML file.
In IE thisworks fine as does the rest of the script, but in FF then focus is passed back to the function caller before the xml document has finished loading, and so not passing back the array that it should.
Any suggestions?
Thanks,
//erlin!
[code=php]
function getConfigBlockArray(rf)
{
var blockArray = new Array();
if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject(“Microsoft.XMLDOM”);
xmlDoc.async = false;
xmlDoc.load(rf);
blockArray = xmlSectionToArr(xmlDoc);
return blockArray;
}
else if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument(“”, “”, null);
xmlDoc.load(rf);
xmlDoc.onload = function()
{
blockArray = xmlSectionToArr(xmlDoc);
return blockArray;
}
}
}