PDA

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



Lobos
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.

-Lobos

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

csoon1
7 Sep 2009, 9:40 PM
Try this:

http://www.extjs.com/forum/showthread.php?t=74151

Lobos
8 Sep 2009, 9:54 AM
Try this:

http://www.extjs.com/forum/showthread.php?t=74151

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);