PDA

View Full Version : oe is undefined?



gemsr.forever
7 Dec 2009, 3:43 AM
Hi,

I am using listener afterrender on toolbar.

Example :
var org_ids_toolbar = new Ext.Toolbar({
renderTo : 'orgs_menu',
width : 100,
items : {text : 'SOBs', width :80, menu: menu},
listeners : { afterrender: function(){ get_org_ids() } }
});

the above example works fine but
when I change the line containing listeners to :

listeners : {afterrender: get_org_ids() }

I get the error "oe is undefined"

Can someone correct me if I am doing something wrong here.

mohit kumar

VinylFox
7 Dec 2009, 5:46 AM
Are you sure you wanted the result of your function as the handler, instead of the function itself.

IE:

{ afterrender: get_org_ids }