script is displaying as child node by mistake
Hi I'm using jQuery plugin for a slideshow. It is working fine until I include it in XML DOM to g
et Node Values. The script I'm using is adding on as a chlid node. See my demo here: http://geewebsolution.com/demo.html
<code>
<script type="text/javascript">
function loadXMLDoc(XMLname)
//
{
var xmlDoc;
if (window.XMLHttpRequest)
{
xmlDoc=new window.XMLHttpRequest();
xmlDoc.open("GET",XMLname,false);
xmlDoc.send(" ");
return xmlDoc.responseXML;
}
// IE 5 and IE 6
else if (ActiveXObject("Microsoft.XMLDOM"))
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load(XMLname);
return xmlDoc;
}
alert("Error loading document!");
return null;
}
</script>
</code>
HTML Reference:
<code>
<
script xml:space type="text/javascript">
for (i = 0; i < M.length; i++) {
document.write(
"<img src='" + xmlDoc.getElementsByTagName("image")[i].childNodes[0].nodeValue + "' />");
}
</
script
>
</code>