Hi, I'm trying to use a ajax function to load an xml...the function is one that
is frequently used/presented in ajax tutorials:
function loadXMLDoc(url)
{
// branch for native XMLHttpRequest object
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = processReqChange;
req.open("GET", url, true);
req.send(null);
// branch for IE/Windows ActiveX version
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.onreadystatechange = processReqChange;
req.open("GET", url, true);
req.send();
}
}
}
this pretty much works on static sites in html but as I am using cocoon, I am
having problem giving the url of the xml...
in xslt i am using something like this to load an xml or to display a certain
value from an xml:
document(concat('cocoon:/','preview','/',folder1/folder2/,file.xml))/root/node
but in ajax if try calling loadXMLDoc(cocoon:/preview/folder1/folder2/file.xml)
surely enough it doesn't work. So has anyone had similar problem and found any
solution? 10x
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]