EXT tabpanel 刷新

//左則菜單點擊事件,重新刷新頁面


tree.on('click', function(node, e){
if(node.isLeaf()){
e.stopEvent();
//var autoLoad = {url:node.attributes.href};
tabPanel.add({
title:node.attributes.text,
id: node.id,
closable:true,
minHeight:500,
autoScroll:false,
frame:true,
html:'<iframe id="iframe'+node.id+'" name="iframe'+node.id+'" src="'+node.attributes.href+'" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>'
});
tabPanel.setActiveTab(node.id);
//點擊左則菜單重新刷新頁面
window.frames["iframe"+node.id].location.reload();
}
});

//Tabpanel上點擊標籤重新刷新頁面

tree.on('click', function(node, e){
if(node.isLeaf()){
e.stopEvent();
//var autoLoad = {url:node.attributes.href};
tabPanel.add({
title:node.attributes.text,
id: node.id,
closable:true,
minHeight:500,
autoScroll:false,
frame:true,
html:'<iframe id="iframe'+node.id+'" name="iframe'+node.id+'" src="'+node.attributes.href+'" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>' ,
listeners:{
activate:function(tab){
window.frames["iframe"+tab.id].location.reload();
}
}
});
tabPanel.setActiveTab(node.id);
}
});
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章