deadpool42
Programmer
- May 24, 2004
- 40
I've been using the responseText property in my AJAX, but I decided to switch over to sending XML and now it doesn't work.
This Javascript:
says undefined, but if I remove the [0], it says object HTMLcollection.
responseXML and documentElement both seem to be defined, so I'm assuming the XML is right. Here's the PHP that generates it:
This Javascript:
Code:
alert(agent.handler.responseXML.documentElement.getElementsByTagName('test')[0]);
responseXML and documentElement both seem to be defined, so I'm assuming the XML is right. Here's the PHP that generates it:
Code:
header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="ISO-8859-1"?><test><![CDATA[this is the content]]></test>';