New tab from child tab

  1. #1

    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 .
  2. #2
    Hi ven,

    The correct call should be parent.addtab(...).

    The code you have posted appears to be correct, so it's a little difficult to determine exactly what might be going wrong without a simplified .aspx sample demonstrating the whole scenario.
    Geoffrey McGill
    Founder

Similar Threads

  1. Combobox child
    By Zdenek in forum 1.x Help
    Replies: 1
    Last Post: Mar 15, 2012, 1:11 PM
  2. how to disable Tab from child page
    By Fabrizio in forum 1.x Help
    Replies: 2
    Last Post: Dec 13, 2011, 6:50 PM
  3. TreePanel and child
    By bolzi89 in forum 1.x Help
    Replies: 7
    Last Post: Dec 08, 2011, 7:41 AM
  4. [1.0] XRender with child controls
    By lukasw in forum 1.x Help
    Replies: 9
    Last Post: Apr 21, 2010, 6:16 AM
  5. Get desktop from a child window
    By huguesV in forum 1.x Help
    Replies: 1
    Last Post: Oct 22, 2009, 10:51 PM

Posting Permissions