View Full Version : LoadMask Modal

28 Oct 2010, 12:06 PM
Hi, we use the following load mask for any interactions with the server:

var myMask = new Ext.LoadMask(Ext.getBody(), {msg:'Please wait...'});
Ext.Ajax.on('beforerequest', function(){ myMask.show();});
Ext.Ajax.on('requestcomplete', myMask.hide, myMask);
Ext.Ajax.on('requestexception', myMask.hide, myMask);

However, when the mask shows we would like it to disable all components behind it, is there a way to do this?


28 Oct 2010, 7:14 PM
Tell the container that holds your components to .disable()?

Override Ext.Component to enable/disable on a custom event?

29 Oct 2010, 8:54 AM

got round it by creating a tiny modal window that sits behind the mask:

var myMask = new Ext.LoadMask(Ext.getBody(), {msg:'Please wait...'});
var commWindow = new Ext.Window({width: 1,height: 1,modal: true});
Ext.Ajax.on('beforerequest', function(){ myMask.show();commWindow.show();});
Ext.Ajax.on('requestcomplete', function(){ myMask.hide();commWindow.hide();});
Ext.Ajax.on('requestexception', function(){ myMask.hide();commWindow.hide();});