Without seeing both the way you’re calling the secondary url from your client-viewable page, and insuring that said php page is executing properly, it’s difficult to offer any input.
The first thing I would try is outputting the entire url string you’re calling into a div on the client page, then copy/paste it into a new browser window to make sure it’s executing like you think it is.
This was already suggested in this thread but it bears repeating. If you’re seeing the source code, it would suggest that php isn’t parsing the document.
I love AJAX and use it all the time. I chose to respond in order to make 2 suggestions.
- The Firebug plugin for Firefox is awesome for troubleshooting AJAX
- Discard prototype.js and start using jQuery.
I have been working with asynchronous stuff for years and have experimented with every technology I’ve been made aware of that focuses on it. After being hesitant to use jQuery initially, I’ve come to decide that it’s one of the greatest recent inventions and will revolutionize web development.