[CLOSED] Add event to tab from client side code

  1. #1

    [CLOSED] Add event to tab from client side code

    I add tabs to tabpanel with bellow code

    var AddTab = function (tabPanel, URL,TITLE) {
        
        
           var tab = tabPanel.add({
                
               title: TITLE,
                closable: true,
                loader: {
                    url:URL,
                    renderer: "frame",
                    loadMask: {
                        showMask: true,
                        //msg: "Loading " + record.data.text + "..."
                    }
                },
                autoScroll: false,
                border: false,
               height:600
            });
       
    
        tabPanel.setActiveTab(tab);
    };
    how I declare close and active event for this tab in this script?
    Last edited by Daniil; Jul 25, 2014 at 2:01 PM. Reason: [CLOSED]
  2. #2
    Hi @matrixwebtech,

    How would you define them for an <ext:Panel> via markup?
    <ext:Panel runat="server">
        <Listeners>
            <Activate Handler="onActivate" />
        </Listeners>
    </ext:Panel>
    You could run a simple .aspx containing that Panel in the <body> and see the rendered JavaScript. Open Page Source in a browser and search for this script.
    Ext.onReady(function() { ... });
    Inside that script you will find a listeners section.

Similar Threads

  1. Replies: 6
    Last Post: Mar 31, 2015, 9:52 AM
  2. Server-side Render to Create Client-Side Snippets of code (For Handlers)
    By michaeld in forum User Extensions and Plugins
    Replies: 4
    Last Post: Mar 07, 2014, 9:54 AM
  3. Add menu item using client side code
    By paul-2011 in forum 2.x Help
    Replies: 2
    Last Post: Sep 18, 2013, 12:04 PM
  4. Replies: 0
    Last Post: Jun 13, 2011, 6:29 AM
  5. Replies: 2
    Last Post: Sep 12, 2008, 10:38 AM

Tags for this Thread

Posting Permissions