How to close tabpanel's tab in other window

  1. #1

    How to close tabpanel's tab in other window

    Hello. I heve next problem:
    I have page with treepanel. When I'm clickin in the tree element will open new tab:

    function addTab(tabPanel, id, title, url) {
                var tab = tabPanel.getComponent(id);
                if (!tab) {
                    tab = tabPanel.add({ 
                        id: id, 
                        title: title, 
                        closable:true,
                         
                        autoLoad: {
                            showMask: true,
                            mode:'iframe',
                            url: url
                        },
                        listeners: {
                            update: {
                                fn: function(tab, cfg) {
                                    cfg.iframe.setHeight(cfg.iframe.getSize().height - 20); 
                                },
                                scope: this,
                                single: true
                            }
                        }
                        
                    });
                }
                tabPanel.setActiveTab(tab);
            }
    
    
    <Listeners>
      <Click Handler="addTab(#{CenterPanel},'IdPeopleNew','test tab', 'update_student.aspx');"  />
     </Listeners>

    At the update_student.aspx pade I have button. When I'll click on it will close created tab.

    How can I do this operation? Help me, please.
    Last edited by geoffrey.mcgill; Aug 05, 2010 at 7:17 PM. Reason: please use [CODE] tags
  2. #2
    See the following forum post,

    http://forums.ext.net/showthread.php...ll=1#post37039

    Hope this helps.
    Geoffrey McGill
    Founder

Similar Threads

  1. How to close tab on dblclick in tabpanel?
    By nanlinfeixue in forum 1.x Help
    Replies: 3
    Last Post: Jan 23, 2013, 4:01 AM
  2. How to close all tabs in TabPanel
    By ozayExt in forum 1.x Help
    Replies: 3
    Last Post: Apr 27, 2012, 11:48 AM
  3. how to close the tabpanel's tab?
    By zg_ivan in forum 1.x Help
    Replies: 2
    Last Post: Dec 13, 2010, 5:25 AM
  4. Can a Tab close itself from TabPanel?
    By ydnah2 in forum 1.x Help
    Replies: 2
    Last Post: Aug 10, 2009, 7:17 AM
  5. Replies: 1
    Last Post: Apr 01, 2009, 12:24 PM

Posting Permissions