[CLOSED] how to open a new tab page????

  1. #1

    [CLOSED] how to open a new tab page????

    by Clicking a button of nested page in tabpanel . how to open a new tab page .

    out of main page is javascript as follow

    <ext:XScript ID="XScript1" runat="server">
            <script type="text/javascript">
                var addTab = function (tabPanel, id, text, url, leaf) {
                    var tab = tabPanel.getComponent(id);
    
                    if (!tab && leaf) {
                        tab = tabPanel.add({
                            id: id,
                            title: text,
                            closable: true,
                            loader: {
                                url: url,
                                renderer: "frame",
                                loadMask: {
                                    showMask: true,
                                    msg: "正在打开 " + text + "..."
                                }
                            }
                        });
    
    
                    }
    
                    tabPanel.setActiveTab(tab);
                }
            </script>
        </ext:XScript>
    Last edited by Daniil; Nov 05, 2013 at 9:35 AM. Reason: [CLOSED]
  2. #2
    Hi @tobros,

    You can access a parent page from its iframe by a "parent" reference.
    parent.addTab(...);

Similar Threads

  1. Replies: 5
    Last Post: Nov 27, 2013, 9:19 PM
  2. Replies: 8
    Last Post: Oct 22, 2012, 2:55 PM
  3. How to open a web page in a tab
    By SeshuKumar in forum 1.x Help
    Replies: 1
    Last Post: Jan 30, 2011, 7:36 PM
  4. How to open a new page
    By helpme in forum 1.x Help
    Replies: 1
    Last Post: Jan 03, 2010, 3:22 AM
  5. Open window on page load
    By Kamal in forum 1.x Help
    Replies: 4
    Last Post: Nov 04, 2009, 11:49 AM

Posting Permissions