I want to make a "Message of the day" panel for my portal, but for some reason i can't get the xml file to load using javascript.
This is my parser code.
This is the code i used to call the function and create the text by getting the "title" tag.Code:function loadXMLDoc("news.xml") { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); } else // IE 5/6 { xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.open("GET","news.xml",false); xhttp.send(); xmlDoc=xhttp.responseXML; }
Can someone please help me out? It'll be greatly appreciated. Thank you.Code:xmlDoc=loadXMLDoc("books.xml"); x=xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue


LinkBack URL
About LinkBacks
Reply With Quote


