View Full Version : tabpanel activeTab error

7 Feb 2010, 11:49 AM
I have a tabpanel and a javascript function on the activate event of the activeTab. It gives an error (invalid argument) on page load. Strangely, the same function call works when placed in another tab that has to be clicked to be made active.
Here is my code.......

var tabs = new Ext.TabPanel({
renderTo: 'site_content',
activeTab : 0,
deferredRender: true,
layoutOnTabChange: true,

items : [{
contentEl : 'tab1',
listeners: {activate: function(){showGrid(54, '2010-02-01', '2010-02-10');}}

title: '2nd',
contentEl : 'tab2',
listeners: {activate: function(){showGrid(54, '2010-02-01', '2010-02-10');}}

The showGrid function creates a grid and places it in a window. It works properly for tab2.
Please help

7 Feb 2010, 9:43 PM
Can someone please help me with this.
I want to call a function on activate of the default tab (activeTab). If the function has no arguments, it works but when it has arguments, an invalid argument error comes up