<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.7" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Ajax with PHP using responseXML</title>
	<link>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/</link>
	<description>Helping newbies learn AJAX with Tutorials</description>
	<pubDate>Fri, 16 May 2008 10:09:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.7</generator>

	<item>
		<title>by: Stuart</title>
		<link>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-133</link>
		<pubDate>Thu, 30 Nov 2006 21:21:05 +0000</pubDate>
		<guid>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-133</guid>
					<description>There was a problem with the code in the source-code link, and the demo - it only became apparent once I upgraded tp PHP5.

The problem was the PHP code was refering to the passed in paramaters in the local scope, and not as $_GET['']. Sorry about that folks - it has now been updated and works again. The older version would still have worked if register_globals was on - but we all know that is not the most secure way to code...lol.</description>
		<content:encoded><![CDATA[<p>There was a problem with the code in the source-code link, and the demo - it only became apparent once I upgraded tp PHP5.</p>
<p>The problem was the PHP code was refering to the passed in paramaters in the local scope, and not as $_GET['&#8217;]. Sorry about that folks - it has now been updated and works again. The older version would still have worked if register_globals was on - but we all know that is not the most secure way to code&#8230;lol.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: stealthkev</title>
		<link>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-111</link>
		<pubDate>Sat, 30 Sep 2006 17:21:16 +0000</pubDate>
		<guid>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-111</guid>
					<description>I'm trying out this codes on my local machine where I'm using Apache 1.3 and PHP 5.1.2 but I keep getting the alert box "Response failed." after I clicked on the button. What's wrong? Should I configure the php.ini or httpd.conf files? Please help.</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying out this codes on my local machine where I&#8217;m using Apache 1.3 and PHP 5.1.2 but I keep getting the alert box &#8220;Response failed.&#8221; after I clicked on the button. What&#8217;s wrong? Should I configure the php.ini or httpd.conf files? Please help.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: stealthkev</title>
		<link>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-110</link>
		<pubDate>Sat, 30 Sep 2006 17:19:20 +0000</pubDate>
		<guid>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-110</guid>
					<description>Hi, I'm trying out this codes on my local machine while I'm using Apache 1.3 and PHP 5.1.2 but I keep on getting the alert box with the message "Response failed". I think that there is something I missed. Should I configure the php.ini or httpd.conf files? Please help. Thanks.</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m trying out this codes on my local machine while I&#8217;m using Apache 1.3 and PHP 5.1.2 but I keep on getting the alert box with the message &#8220;Response failed&#8221;. I think that there is something I missed. Should I configure the php.ini or httpd.conf files? Please help. Thanks.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: mowges</title>
		<link>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-85</link>
		<pubDate>Mon, 10 Jul 2006 21:03:15 +0000</pubDate>
		<guid>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-85</guid>
					<description>your header should be:
header("Content-type: text/xml");</description>
		<content:encoded><![CDATA[<p>your header should be:<br />
header(&#8221;Content-type: text/xml&#8221;);
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Jonic</title>
		<link>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-9</link>
		<pubDate>Sat, 18 Mar 2006 03:47:21 +0000</pubDate>
		<guid>http://www.ajaxtutorial.net/index.php/2006/02/28/ajax-with-php-using-responsexml/#comment-9</guid>
					<description>Nice guide, I found it really useful, but I have one question: What's the significance of the documentElement part of the following line?

&lt;code&gt;var response = http.responseXML.documentElement;&lt;/code&gt;

I'm currently having a nightmare with AJAX because of something around this area of the script. I can get the data I need, and responseText returns exactly what I requested, but I need it in XML to be able to parse it. My returned XML does return "object XML Document" when I run a typeof on the variable, but for some reason I can't walk through it pull data out.

&lt;code&gt;	[...]
	http.onreadystatechange = function () {
		if (http.readyState == 4) {
			if (http.status == 200) {
				response = http.responseXML.documentElement;
				check(yti_response);
			} else {
				alert('Some sort of server error message here');
			}
		}
	}
	http.send(null);
}

function check(response) {
	status = response.getElementsByTagName("tagname")[0].firstChild.nodeValue;
	alert(status);
	[...]
&lt;/code&gt;

It's all syntactically correct, but for some reason the script just stops running (or gets stuck) when I try to getElementsByTagName. The weirdest thing is that Firefox doesn't return any kind of JS error whatsoever.

Even stranger is that with .documentElement added to the http.responseXML the script stops running &lt;em&gt;there&lt;/em&gt;.

Anyone have any ideas? I'm going crazy...</description>
		<content:encoded><![CDATA[<p>Nice guide, I found it really useful, but I have one question: What&#8217;s the significance of the documentElement part of the following line?</p>
<p><code>var response = http.responseXML.documentElement;</code></p>
<p>I&#8217;m currently having a nightmare with AJAX because of something around this area of the script. I can get the data I need, and responseText returns exactly what I requested, but I need it in XML to be able to parse it. My returned XML does return &#8220;object XML Document&#8221; when I run a typeof on the variable, but for some reason I can&#8217;t walk through it pull data out.</p>
<p><code>	[...]<br />
	http.onreadystatechange = function () {<br />
		if (http.readyState == 4) {<br />
			if (http.status == 200) {<br />
				response = http.responseXML.documentElement;<br />
				check(yti_response);<br />
			} else {<br />
				alert('Some sort of server error message here');<br />
			}<br />
		}<br />
	}<br />
	http.send(null);<br />
}</p>
<p>function check(response) {<br />
	status = response.getElementsByTagName("tagname")[0].firstChild.nodeValue;<br />
	alert(status);<br />
	[...]<br />
</code></p>
<p>It&#8217;s all syntactically correct, but for some reason the script just stops running (or gets stuck) when I try to getElementsByTagName. The weirdest thing is that Firefox doesn&#8217;t return any kind of JS error whatsoever.</p>
<p>Even stranger is that with .documentElement added to the http.responseXML the script stops running <em>there</em>.</p>
<p>Anyone have any ideas? I&#8217;m going crazy&#8230;
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
