PDA

View Full Version : run scripts in two TabPanelItems in order



malcom
21 May 2007, 1:13 AM
hi,

There is a TabPanel control includes two TabPanelItems which refer to t1.htm and t2.htm files, I wrote some javascript codes in both t1.htm and t2.htm, and hope these codes could be run by order of (1)t1.htm, (2)t2.htm, but it seems because of file size reason(t1.htm is larger), it always run script of t2.htm first !!

Can someone help me?
Here is my codes to create these two TabPanelItem controls:

var t_page;
var t_tab = new Ext.TabPanel('tab');
t_page = t_tab.addTab('tab1','test 1');
t_page.getUpdateManager().loadScripts = true;
t_page.setUrl('t1.htm', null, true);
t_page.refresh();
//
t_page = t_tab.addTab('tab2','test 2');
t_page.getUpdateManager().loadScripts = true;
t_page.setUrl('t2.htm', null, true);
t_page.refresh();

Animal
21 May 2007, 2:00 AM
Have the script in t1 perform the load of the second tab.

malcom
21 May 2007, 4:03 PM
Thanks Animal,
That's good !!