View Full Version : [solved]Global Loading mask for Ajax Transactions

7 Sep 2009, 7:55 PM
Hi there,

does anyone know of a plugin or override that you can set to make all ajax transactions, eg Ext.Ajax.request as well as form / panel loads fire some kind of event? I would like to have a little loading spinner up in the corner that activates while the ajax request is in progress (for all ajax transactions) and I was wondering what the best way to go about this would be.

Thanks for any advice you can give.


7 Sep 2009, 8:04 PM
Why not add a Class level listener using the static Observable.observeClass method.

7 Sep 2009, 9:40 PM
Try this:


8 Sep 2009, 9:54 AM
Try this:


Thanks for that, this is the concept here:

Ext.Ajax.on('beforerequest', this.showSpinner, this);
Ext.Ajax.on('requestcomplete', this.hideSpinner, this);
Ext.Ajax.on('requestexception', this.hideSpinner, this);