All callbacks receieve instance of Ajax.Response [1] as a first
argument. This instance simply wraps plain xhr response object and
provides few convenient methods.
[1] http://www.prototypejs.org/api/ajax/response
- kangax
On Mar 21, 6:21 pm, fer <gog...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hy, I´m using prototype.js to build an ajax application but I hava
> some doubts. For example, the next code I´ve taken from the official
> website:
>
> new Ajax.Request(url, { method: ''get'', onSuccess:
> function(transport) { ....
> };
>
> 1. I read that the parameter "transport" in the next code
"onSuccess:
> function(transport){....}", was the XMLHttpRequest so if I define a
> function to execute with any XMLHttpRequest event like onComplete,
> onSuccess, onFailure...., automatically prototype.js will load the
> parameter defined in the function (in this case called transport) with
> the XMLHttpRequest? right?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---