raviganesh91221
07-19-2006, 08:13 AM
This is the javascript I used to load a xml in firefox but it is not working
Is this javascript correct.
function loadXMLMoz(xmlFile)
{
xmlDoc = document.implementation.createDocument("","",null);
xmlDoc.load(xmlFile);
xmlDoc.onload = dispxmlMoz;
}
function dispxmlMoz()
{
document.getElementById("pctd1").innerHTML=""
document.getElementById("pctd1").innerHTML="<ul>";
for(i=0;i<5;i++)
{
titlevar=xmlDoc.getElementsByTagName("Article");
urlvar=xmlDoc.getElementsByTagName("Article");
document.getElementById("pctd1").innerHTML=document.getElementById("pctd1").innerHTML+"<a href="+urlvar[i].getAttribute("URL")+" target='_blank'><li>"+titlevar[i].getAttribute("Title")+"</li></a><br/>";
}
}
Is this javascript correct.
function loadXMLMoz(xmlFile)
{
xmlDoc = document.implementation.createDocument("","",null);
xmlDoc.load(xmlFile);
xmlDoc.onload = dispxmlMoz;
}
function dispxmlMoz()
{
document.getElementById("pctd1").innerHTML=""
document.getElementById("pctd1").innerHTML="<ul>";
for(i=0;i<5;i++)
{
titlevar=xmlDoc.getElementsByTagName("Article");
urlvar=xmlDoc.getElementsByTagName("Article");
document.getElementById("pctd1").innerHTML=document.getElementById("pctd1").innerHTML+"<a href="+urlvar[i].getAttribute("URL")+" target='_blank'><li>"+titlevar[i].getAttribute("Title")+"</li></a><br/>";
}
}