Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About PlayerUno

  • Rank
  1. Hey guys, I'm pretty rusty on my XML and have worked off some code online to display an XML RSS in Explorer, but it unfortunately isn't working in Firefox. Any one know what I could do to make it work accross all browzers? function loadXMLDoc(dname){try //Internet Explorer { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); }catch(e) { try //Firefox, Mozilla, Opera, etc. { xmlDoc=document.implementation.createDocument("","",null); } catch(e) {alert(e.message)} }try { xmlDoc.async=false; xmlDoc.load(dname); return(xmlDoc); }catch(e) {alert(e.message)}return(null);} [...] <script type="text/javascript"> //document.write("Test1"); var xmlDoc = loadXMLDoc("rss-manuals-eng.xml"); //document.write("Test2"); var y = xmlDoc.getElementsByTagName("item"); //document.write("Test3"); //document.write(y.length); var z; for (z=0; z<y.length; z++){ //document.write(z); document.write("<h2>"+ y[z].childNodes[0].childNodes[0].nodeValue +"</h2>");// title document.write("<p><strong>"+ y[z].childNodes[3].childNodes[0].nodeValue + "<\/strong>: ");// date document.write(y[z].childNodes[2].childNodes[0].nodeValue+ "<br>"); // description document.write('<a href="' + y[z].childNodes[1].childNodes[0].nodeValue + '">Link here<\/a><\/p>'); // link }</script>
  • Create New...