Aug 19, 2010, 10:39 AM
How to load pages in same tab with single iframe
Hi ,
I want to keep only one tab at a time.I used this script for displaying tabs.How can i do that.(I am using the same as in example explorer)
I want to keep only one tab at a time.I used this script for displaying tabs.How can i do that.(I am using the same as in example explorer)
<script type="text/javascript">
var loadPage = function(tabPanel, node) {
var tab = tabPanel.getItem(node.id);
if (!tab) {
tab = tabPanel.add({
id: node.id,
title: node.text,
closable: true,
autoLoad: {
showMask: true,
url: node.attributes.href,
mode: 'iframe',
maskMsg: 'Loading ' + node.attributes.href + '...'
},
listeners: {
update: {
fn: function(tab, cfg) {
cfg.iframe.setHeight(cfg.iframe.getSize().height - 20);
},
scope: this,
single: true
}
}
});
}
tabPanel.setActiveTab(tab);
}
</script>