I always thought the parameter to the callback was just the server reply (response) The docs show transport as a param, I didn't realise it was an instance of the request.
Given this information, you're right, there's not a lot of sense to what i'm doing. After a quick spot of searching the API docs, it is mentioned there.. http://www.prototypejs.org/api/ajax/options Common callbacks When used on individual instances, all callbacks (except onException) are invoked with two parameters: the XMLHttpRequest object and the result of evaluating the X-JSON response header, if any (can be null). However, you have to actually check Ajax.Response; http://www.prototypejs.org/api/ajax/response To see what the structure of the first paramter should be. Is it worth rewording the common callbacks section and providing a link to ajax.response here? Also a function signature could be included in the common callbacks section. Might prevent others from making the same mistake. Gareth On Jan 28, 2008 1:29 PM, kangax <[EMAIL PROTECTED]> wrote: > > Gareth, > > new instance of Ajax.Response is passed as a first argument into a > callback. That instance has request property which points to request > object (the one that has all your settings/parameters, etc.). I don't > really see a reason to do what you're doing. > > Best, > kangax > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---