[CLOSED] Tab activate event

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Tab activate event

    Hi,

    I have created a bunch of tabs, each with their own iframe. The iframes are loaded when the "activate" direct event is fired. eg

    
            <a href="#" onclick="#{_tabPanel1}.setActiveTab(#{_tab3});#{_tab3}.reload();">load tab 3</a>
    
            <br /><br /><br /><br />
    
            <ext:TabPanel ID="_tabPanel1" runat="server" AutoHeight="true" Border="true" AutoWidth="true" EnableTabScroll="true">
                <Items>
                    <ext:Panel  
                        ID="_tab1"
                        runat="server" 
                        Height="470"
                        Title="Tab 1">
                    </ext:Panel>
                    <ext:Panel  
                        ID="_tab2"
                        runat="server" 
                        Height="470"
                        Title="Tab 2">
                    </ext:Panel>
                    <ext:Panel 
                        ID="_tab3" 
                        runat="server" 
                        Height="470"
                        Title="Tab 3">
                        <DirectEvents>
                            <Activate OnEvent="ActivatePlease" Timeout="60000">
                                <EventMask ShowMask="true" MinDelay="150" Msg="activating..." />
                                <ExtraParams>
                                    <ext:Parameter Name="AccountId" Value="123456" />
                                </ExtraParams>
                            </Activate>   
                        </DirectEvents>
                    </ext:Panel>
                </Items>
                <CustomConfig><ext:ConfigItem Name="idDelimiter" Value="$$" Mode="Value" /></CustomConfig>
            </ext:TabPanel>
    
            protected void ActivatePlease(object sender, DirectEventArgs e)
            {
                var accountId = e.ExtraParams["AccountId"];
                if (!String.IsNullOrEmpty(accountId))
                {
                    _tab3.LoadContent(new LoadConfig("http://www.google.co.uk", LoadMode.IFrame, false));
                }
            }
    This code works fine if the tab i wish to go to is not already activated/selected

    However if i want to refresh the iframe within the tab, what client side method do i need to call? Alternatively, what directevent event should i be calling when i do a reload client side? Please note that if i use the "Update" directevent, the iframe keeps refreshing itself every couple of seconds.

    Many Thanks

    Lee
    Last edited by geoffrey.mcgill; Aug 02, 2010 at 5:20 AM.

Similar Threads

  1. Replies: 1
    Last Post: May 18, 2012, 1:52 PM
  2. [CLOSED] Add Activate Event to dynamically created tabs
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 02, 2011, 5:37 PM
  3. [CLOSED] Adding Activate Event to tabs throwing error
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 17, 2011, 8:54 AM
  4. [CLOSED] Make enter key activate button click direct event
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 15, 2010, 6:02 PM
  5. Tabpanel / Tab activate event
    By locoperoguapo in forum 1.x Help
    Replies: 1
    Last Post: Feb 17, 2009, 1:09 PM

Posting Permissions