Prototype stores the number of active AJAX requests in Ajax.activeRequestCount
. Is there something similar in jQuery/Mootools etc or something that can be used from XMLHttpRequest?. Ideally I need a library independent method of detecting the number of active AJAX requests within a page. If not, a method for each library would suffice.
views:
250answers:
3
+2
A:
Prototype only keeps track of the number of active requests made using Prototype APIs. If you were to make an AJAX request using any other method, Ajax.activeRequestCount
will not be affected. There is no cross-library way to keep track of every request made, unless you were to keep track of them yourself.
Dumb Guy
2009-12-23 09:42:55
+1
A:
$.active
for jQuery, as I see from the documentation
MooTools doesn't seem to have one (here's the Request class source)
Perhaps for MooTools you could make an intermediary function to call Ajax, and make your own count there?
Gausie
2009-12-23 10:17:23