i have a problem to access some file from different source. for example i have html folder and xml folder in same directory. then from html file i wanna access xml file in xml folder. in html i have script to call file xmlDoc=loadXMLDoc("../xml/note.xml");
why this path doesnt work as well?
this is my code of loadXmlDoc()
function loadXMLDoc(dname)
{
var xmlDoc;
if (window.XMLHttpRequest)
{
xmlDoc=new window.XMLHttpRequest();
xmlDoc.open("GET",dname,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(dname);
return xmlDoc;
}
alert("Error loading document");
return null;
}