In prototype, there's a function called Ajax.Request, which trying but I'm having difficulty understanding it.
Here is a sample script from
a very good online tutorial:
My question is this:
The function "showResponse()", which is passed to Ajax.Request, calls another function "originalRequest()". No mention is made of this "originalRequest()" function in the tutorial, and I have no idea what it means. I have emailed the author twice and he said this:
The function you pass in will be called by the object with two arguments, the first one will be the XMLHttpRequest
To be clear, it is the XmlHttpRequest object that carried out the request/response. There's no reference to myAjax in the callback.
Not sure what this means.
I have some Ajax code that is currently not working, and I feel this is the reason. I have tried creating XHR object and passing it in, but that did not work. Please help!!!
[ July 18, 2007: Message edited by: Bear Bibeault ]