|
I am trying to use this fab dangle feature of Javascript, new XMLHttpRequest, and I need to know how to use it with a PHP file.
Could you explain, where in the below have I gone wrong?
I have used two test files for the XMLHttpRequest function to upload, being these
++ one with a .xml extention - This one works fine
++ one with a .php extention - I get an error message, dispite having the exact same text within the file.
The error happens,
As it tries to read,
xh=xml.getElementsByTagName("h")[a].childNodes[0].nodeValue;
Inside the onreadystatechange function.
While the PHP file is not on a PHP machine, it should read it just like Firefox treats such files as a normal HTML file, and while I have plain XML tags in the PHP file, it should treat that just like the .xml file.
I do have inside the function, the statement of xhr.responseText.contentType='text/xml';xml=xhr.responseXML;
|