PDA

View Full Version : Handle all Ext.Ajax beforerequest events.



psan
24 Nov 2007, 10:22 AM
Hi,

I've got trouble getting the code at http://extjs.com/forum/showthread.php?t=17652 to work.
The problem occurs when I load many ajax calls at the same time. Some of the events never get fired (at least when I debug in firebug). And I

hendricd
24 Nov 2007, 10:39 AM
Yes, what's really needed is support for abort/autoAbort event. This is currently the only scenario that doesn't notify anyone when it occurs:


Ext.Ajax.addEvents('abort');

Ext.apply(Ext.Ajax,{
/**
* Aborts any outstanding request.
* @param {Number} transactionId (Optional) defaults to the last transaction
*/
abort : function(transId){
if(transId || this.transId || this.isLoading()){
Ext.lib.Ajax.abort(transId || this.transId);
this.fireEvent("abort", this, transId || this.transId);
}
}
});