View Full Version : .getEl() on a combo box undefined?

29 Nov 2011, 4:01 PM

I'm trying to hide the label of a combobox:


When I do this, Firebug shows the error message: "Ext.getCmp("myComboId").getEl() is undefined".

However, if I put a

directly in front of that line of code, the object is logged in the console and I can check and find the method getEl() in Firebug.
console.log(Ext.getCmp("myComboId").getEl()); logs "undefined".

Why does this happen and how can I fix it?

Thank you,

29 Nov 2011, 4:04 PM
What is mediaHeader? When are you doing this, after the combo has been rendered?

29 Nov 2011, 4:09 PM
mediaHeader is the id of the combo, I changed it to myComboId to make the code easier to read and forgot it twice. Fixed now, sorry for the confusion. The combo should have been rendered when I'm doing this, but the file is pretty complex, so I'm not entirely sure. Is there a way to check that?