Eric, thanks for the answer. I was hoping to be able to get the options (parameters in particular) that where used in the origian request. Oh well. Ill find another solution.
On 5-Aug-06, at 8:23 AM, Eric Anderson wrote: Alex Duffield wrote: I am curious what gets passed back from an completed Ajax.Request call?
All of the Ajax.Request event handlers receive two arguments. The first is the XMLHttpRequest object used to make the Ajax request. This is often referred to as the transport in the Prototype library. You can find details about this object at:
The second argument passed in is a _javascript_ data structure created from a JSON string. This JSON string is received from the X-JSON header in the HTTP response for your Ajax call.
Finally, all event handlers for the Ajax.Request object are executed in the context of the Ajax.Request object. That means that the "this" identifier can be used to query the Ajax.Request object that made the request.
There is one exception to what I just stated. The onException callback just receives one argument which is the exception that was generated.
I am using "onComplete: handleSuccess" in my request:
You may want to consider using onSuccess instead of onComplete. onComplete executes when the XMLHttpRequest object has completed the request but that request is not necessarily successful. For example it could have received a 404 response and still called onComplete. When you use onSuccess your callback will only be executed when you get back a successful response from the webserver. You can use onFailure to detect problems such as 404 responses.
Eric
_______________________________________________ Rails-spinoffs mailing list
|
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs