ext tabpanel

同时打开 a.php和b.php两个TAB(是一个,是纯PHP页面)  在a.php中修改DB中数据 b.php中显示会有变化 如何使在a.php修改了数据 激活b.php的时候自动更新内容呢?


function treeClick(node,e) {
if(node.isLeaf()){
e.stopEvent();
url = "";
switch (node.id){
case '101':url = "a.php";break;
case '102':url = "b.php";break;
case '201':url = "c.php";break;
case '202':url = "d.php";break;
}
var n = tab.getComponent(node.id);
if (!n) {
var n = tab.add({
'id' : node.id,
'title' : node.text,
closable:true, 
html : ' < scrolling="auto" frameborder="0" width="100%" height="100%" src="'+url+'"> '//,

                  //autoload:{url:url;s:true}//,
                  //listeners:{
                  //  activate:function(tab){
                  //    tab.getUpdater().refresh();
                        //  }
                  // },

    });
}
tab.setActiveTab(n);
//n.load({
// url: url,
// nocache: true,
// scope: this,
// s: true
//});

}
}

//生成标签页
var tab = new Ext.TabPanel({
region:'center',
deferredRender:false,
activeTab:0,
resizeTabs:true, // turn on tab resizing
minTabWidth: 115,
tabWidth:135,
enableTabScroll:true//,
                  //listeners:{
                  //  activate:function(tab){
                  //      tab.getUpdater().refresh();
                        //    }
                        //}
});



试着个tab.doLayout()这个在tabChange事件中其左右不





猜你喜欢

转载自sammyfun.iteye.com/blog/1050912
ext