PDA

View Full Version : getId(); not working for me?



jaisonjames
29 Dec 2010, 11:09 PM
getId or getItemId() not working in following code.

Ext.get('col1').select('>div').each(function(div) {
alert(div.getWidth());
alert(div.getHeight());
alert(div.getTop());
alert(div.getId());
});

Can someone help me please?

Condor
30 Dec 2010, 1:02 AM
Your 'div' is an Ext.Element instance that doesn't have a getId or getItemId method.

You could use:

alert(Ext.id(div));