When ever app does ajax request i want to add load mask
In my sencha application, When ever app does ajax request i want to add load mask and after request complete i need to remove load mask. I tried below code but, its not working for me var mask = new Ext.LoadMask(Ext.getBody(), {msg:"Loading..."}); Ext.Ajax.on('beforerequest', function(){ mask.show(); }); Ext.Ajax.on('requestcomplete', function(){ mask.hide(); }); To show load mask you can use: Ext.Viewport.mask({ xtype: 'loadmask' }); And hide the load mask inside the success function of your Ajax request: Ext.Viewport.unmask(); Gayathri Mohan It is very easy Try these Ext.Ajax.request({