Ok I am having a problem and I cannot figure it out. In internet explorer the script works great. Firefox is being a pain.
Any ideas?
My sites: amd
Code:
<script type="text/javascript">
var xmlDoc=null;
if (window.ActiveXObject)
{// code for IE
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
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("xml/events.xml");
var x=xmlDoc.getElementsByTagName("item");
for (var i=0;i<x.length;i++)
{
document.write("<h4>");
document.write(x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue);
document.write("</h4>");
document.write("<p>");
document.write(x[i].getElementsByTagName("event")[0].childNodes[0].nodeValue);
document.write("<br />");
document.write("</p>");
}
</script>
Any ideas?
My sites: amd