views:

42

answers:

1

Hi, I have an ASP page, which on load fires a bunch of AJAX calls. How can I detect in javascript that all AJAX calls finished? The ajax calls are made using AJAXPRO library.
I need this in order to execute some event.

Thanks,
Adrian

+1  A: 

You can use the ajaxStop global event:

  • ajaxStop (Global Event)

This global event is triggered if there are no more Ajax requests being processed.

Example:

 $(document).bind("ajaxStop", function(){
   alert("ajax requests have ended!");
 });
karim79
for some reason ajaxStart and ajaxStop events are not firing...
Adrian Magdas
ajaxStop event is fired only for ajax calls made with jquery. I'm using AjaxPro library, any clues how to handle that?
Adrian Magdas
seems that the only way is to use jQuery for AJAX calls...a lot of work ahead
Adrian Magdas