As you can see in my post, I use this method already.
I don't just want to count connections, I want to defer connections
until others are finished.
I found a way to do this, but for that I need to implement it at every
spot where I use Ajax.Request.
So I'm looking for a way to overload the default behavior of
Ajax.Request or modify it using a responder.
tnx anyway
On 8 nov, 18:26, Tom Gregory <[EMAIL PROTECTED]> wrote:
> If you just want to count connections, current versions of Prototype
> already do that for you, via a built-in Ajax responder.
>
> Take a look at "Ajax.activeRequestCount".
>
> TAG
>
> On Nov 8, 2007, at 10:14 AM, [EMAIL PROTECTED] wrote:
>
>
>
> > Hi,
>
> > Is there a way to get a handle to the ajax-request that gets caught by
> > a responder?
> > At the moment I use this:
>
> > load: function(url) {
> > if(Ajax.activeRequestCount < 2) {
> > new Ajax.Request(
> > '/people', {
> > method:'get',
> > onSuccess: this.parseAjaxResponse.bind(this)
> > });
> > } else {
> > this.load.bind(this).defer(url);
> > }
> > },
>
> > to make sure there aren't too many connections open. IE sometimes
> > tripped on those.
>
> > I would like to put this functionality into a responder so I don't
> > have to do it everyplace i create requests.
> > It would be nice if the onCreate responder was able to pause the
> > creation, and resume when ready (just like above).
>
> > Any possible solutions?
>
> > thanks
> > Mathijs
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---