0

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

sushant jain
  • 213
  • 1
  • 4
  • 12

2 Answers2

0

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

Surya Prakash Tumma
  • 2,153
  • 4
  • 27
  • 47
0

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/

Vlad
  • 3,626
  • 16
  • 14