The response object has a property of request.

One issue I found. If there is an exception, the exception always gets
the request object.

http://dev.rubyonrails.org/ticket/9691

I've sent a patch which would add the response to the request (which
is fed to the exception) to allow an exception to get the whole
picture.

On 28/01/2008, Gareth Evans <[EMAIL PROTECTED]> wrote:
> 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
> >
> >
> >
> > > >
> >
>


-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to