normanhab101
22 Apr 2009, 4:34 AM
Hi all!
I had an ExtJs 2 app (cross browser) and migrated to version 3.
Everything worked fine, except for a TabPanel inside a Viewport:
var tabPanel = new Ext.TabPanel({
region:'center',
id:'center-panel',
deferredRender:false,
enableTabScroll:true,
margins: '0 5 0 0',
activeTab:0,
items:[{
contentEl:'center2',
title: 'Home',
closable:false,
autoScroll:true
}]
});
function addTab(tabId,tabTitle, targetUrl){
tabPanel.add({
id: tabId,
title: tabTitle,
autoLoad: {url: targetUrl, callback: this.initSearch, scope: this, scripts: true},
closable:true
}).show();
}
function updateTab(tabId,title, url) {
var tab = tabPanel.getItem(tabId);
if(tab){
tab.getUpdater().update(url);
tab.setTitle(title);
}else{
tab = addTab(tabId,title,url);
}
tabPanel.setActiveTab(tab);
}
var count = 0;
var actions = {
'id1' : function(){
updateTab('tab0','One','filewithextjscript.php');
},
'id2' : function(){
updateTab('tab1','Two','filewithextjscript.pvt.php');
},
'id3' : function(){
updateTab('tab2','Three','filewithextjscript.pvt.php');
},
'id4' : function(){
updateTab('tab3','Four','filewithextjscript.pvt.php');
}
};
function doAction(e, t){
e.stopEvent();
actions[t.id]();
}
menuPanel.body.on('mousedown', doAction, null, {delegate:'a'});
This works fine in Firefox, but in IE6 IE7 and IE8 the TabPanel's content don't show.
I guess there is something wrong with this:
(if I put only html on filewithextjscript.php shows ok, but extjs don't)
function addTab(tabId,tabTitle, targetUrl){
tabPanel.add({
id: tabId,
title: tabTitle,
autoLoad: {url: targetUrl, callback: this.initSearch, scope: this, scripts: true},
closable:true
}).show();
}
I appreciate help. :D
Thanks very much.
I had an ExtJs 2 app (cross browser) and migrated to version 3.
Everything worked fine, except for a TabPanel inside a Viewport:
var tabPanel = new Ext.TabPanel({
region:'center',
id:'center-panel',
deferredRender:false,
enableTabScroll:true,
margins: '0 5 0 0',
activeTab:0,
items:[{
contentEl:'center2',
title: 'Home',
closable:false,
autoScroll:true
}]
});
function addTab(tabId,tabTitle, targetUrl){
tabPanel.add({
id: tabId,
title: tabTitle,
autoLoad: {url: targetUrl, callback: this.initSearch, scope: this, scripts: true},
closable:true
}).show();
}
function updateTab(tabId,title, url) {
var tab = tabPanel.getItem(tabId);
if(tab){
tab.getUpdater().update(url);
tab.setTitle(title);
}else{
tab = addTab(tabId,title,url);
}
tabPanel.setActiveTab(tab);
}
var count = 0;
var actions = {
'id1' : function(){
updateTab('tab0','One','filewithextjscript.php');
},
'id2' : function(){
updateTab('tab1','Two','filewithextjscript.pvt.php');
},
'id3' : function(){
updateTab('tab2','Three','filewithextjscript.pvt.php');
},
'id4' : function(){
updateTab('tab3','Four','filewithextjscript.pvt.php');
}
};
function doAction(e, t){
e.stopEvent();
actions[t.id]();
}
menuPanel.body.on('mousedown', doAction, null, {delegate:'a'});
This works fine in Firefox, but in IE6 IE7 and IE8 the TabPanel's content don't show.
I guess there is something wrong with this:
(if I put only html on filewithextjscript.php shows ok, but extjs don't)
function addTab(tabId,tabTitle, targetUrl){
tabPanel.add({
id: tabId,
title: tabTitle,
autoLoad: {url: targetUrl, callback: this.initSearch, scope: this, scripts: true},
closable:true
}).show();
}
I appreciate help. :D
Thanks very much.