|
I would suggest that you get an alternative book on JavaScript to learn from as the second edition of that book is a history book on how JavaScript worked eight plus years prior to when it was written and has nothing in it whatever that relates to current JavaScript coding.
The actual cause of your error is that you need an extra line near the top of the PHP before it echos anything to set the content type to text
header('Content-type: text/plain');
Without that the processing doesn't know to load the result into responseText as it doesn't know whether the PHP has generated XML, text or something else and so doesn't load either responseText or responseXML.
|