View Single Post
Old 01-22-2012, 06:38 AM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,451
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
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.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Users who have thanked felgall for this post:
Spidey1980 (01-22-2012)