PDA

View Full Version : Toolbar this.focusEl is undefined error.



scusyxx
2 Dec 2010, 12:44 PM
Hi I have a toolbar and when I click on the buttons it raises 'this.focusEl is not defined' error. It is working fine on my localhost but it gives this error when I try on our test servers. The code is below. Any help appreciated.



topToolbar = new Ext.Toolbar({
items:[

{title: 'Download',
columns: 1,
xtype: 'buttongroup',
items:[{
scale: 'small',
iconAlign: 'left',
width: 120,
text:'Table',
menu: [{text: 'Text File (.txt)',
handler: function(){
DownloadFile('txt');
}
},
{text: 'Excel file (.xls)',
handler: function(){
DownloadFile('xls');
}
}]
}]
},'->', '-',
{title: 'Help',
columns: 1,
xtype: 'buttongroup',
items:[{
width:120,
scale: 'large',
rowspan: 2,
iconAlign: 'top',
text:'FAQ',
handler: function(){
callFAQ();
}
}]
}]
});

mankz
2 Dec 2010, 12:48 PM
Ext version? Same Ext version on local and test server?

scusyxx
2 Dec 2010, 12:58 PM
Yes same versions which is 3.3.0.

scusyxx
2 Dec 2010, 6:47 PM
any help?

Animal
2 Dec 2010, 11:47 PM
Have you tried debugging?

scusyxx
3 Dec 2010, 6:21 AM
I tried to follow using firebug but was not successful.
The error on Chrome is below.
Uncaught TypeError: Cannot call method 'focus' of undefined
Ext.menu.Menu.Ext.extend.doFocusext-all.js:11
(anonymous function)
This problem is only visible when I click toolbar button which has 'menu' (e.g. Download button in code above)