Hello, I have multiple Ajax calls in my application and there is a "BUSY" div containing a wait image while all the calls are completed. I now want to include a cancel button which will hide the div and abort all existing ajax calls. The following is the Ajax responder I am using:
Ajax.Responders.register({ onCreate: function() { Ajax.activeRequestCount = Ajax.activeRequestCount + 1; if(($('busy')) && Ajax.activeRequestCount>0) { document.getElementById('busy').style.visibility = 'visible'; document.getElementById('busy').style.display = ''; document.getElementById('busy').style.opacity = '.50'; } }, onComplete: function() { Ajax.activeRequestCount = Ajax.activeRequestCount - 1; if (Ajax.activeRequestCount <= 0) { document.getElementById('busy').style.visibility='hidden'; document.getElementById('busy').style.display = 'none'; $('busy').style.zIndex = '5000'; } } }); Since the control comes to the oncreate function for every ajax call, could you please tell me if there is a way I can access the list of current ajax requests and cancel them all in one go rather than call the abort function for each individual Ajax request? Thank You -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.