I am assigning id to load mask in configuration part, but still i can find auto generated id instead of config id.
var myMask = new Ext.LoadMask(myPanel, {msg:"Please wait...",id:"myMaskId"});
myMask.show();
I am assigning id to load mask in configuration part, but still i can find auto generated id instead of config id.
var myMask = new Ext.LoadMask(myPanel, {msg:"Please wait...",id:"myMaskId"});
myMask.show();
I had checked in my system.. it is giving your defined id..
my code
var myMask = new Ext.LoadMask(" ", {msg:"Please wait...",id:"myMaskId"});
alert(myMask.id);
Your id is OK, just use Ext.getCmp():
Ext.getCmp('myMaskId');
But better use itemId property and ComponentQuery:
new Ext.LoadMask(p, {
msg: 'Mask 2',
itemId: 'myItemId',
});
...
var m = Ext.ComponentQuery.query('component[itemId=myItemId]')[0];
Examples with id & itemId: http://jsfiddle.net/9EzZq/