Dec 19, 2011, 11:25 AM
New tab from child tab
Hello on parent page im using this code to open new tabs in tabpanel with loading of aspx pages in iframes:
var addTab = function (tabPanel, id, tytul, url) {
var tab = tabPanel.getComponent(id);
if (!tab) {
tab = tabPanel.add({
id: id,
title: tytul,
closable: true,
padding: 5,
autoLoad: {
showMask: true,
url: url,
mode: "iframe",
maskMsg: "Loading " + url + "..."
}
});
tab.on("activate", function () {
var item = MenuPanel1.menu.items.get(id + "_item");
if (item) {
MenuPanel1.setSelection(item);
}
}, this);
}
now i need to open new tab using this function but from child page created using this, how to call this parent function? i tried parent.addtab, parent.window.addtab and other combinations without effect .