[CLOSED] Tab activate event

  1. #1

    [CLOSED] Tab activate event


    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">
                        Title="Tab 1">
                        Title="Tab 2">
                        Title="Tab 3">
                            <Activate OnEvent="ActivatePlease" Timeout="60000">
                                <EventMask ShowMask="true" MinDelay="150" Msg="activating..." />
                                    <ext:Parameter Name="AccountId" Value="123456" />
                <CustomConfig><ext:ConfigItem Name="idDelimiter" Value="$$" Mode="Value" /></CustomConfig>
            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

    Last edited by geoffrey.mcgill; Aug 02, 2010 at 6:20 AM.
  2. #2
    hmmm, I don't understand what you are asking for here. Do you just want to reload the Tab? If yes, then call .reload() on the Tab object.

    If you want to perform some action on the server-side and not use a DirectEvent, you could configure a DirectMethod.

    More information is required.
    Geoffrey McGill
    Founder & CEO
  3. #3
    Hi Geoffrey,

    The .reload() method just refreshes the iframe. I want to call a direct event to reload a different iframe within the tab that is currently active.

    The Activate DirectEvent is fired when i select the tab, however if i am already on a tab i wish to reactivate, i am not sure what DirectEvent i should be using. At the same time i am curious as to whether a client side method can reactivate my tab.

    Hope that has cleared any confusion.

  4. #4

    You have to set ReloadOnEvent="true" and TriggerEvent="show" for the AutoLoad
    Please see the following sample ("Loading on Show with Reloading" tab)
    Vladimir Shcheglov
    Sr. Developer
  5. #5
    Thanks Vlad,

    Works a treat!! :o

Similar Threads

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

Posting Permissions