[CLOSED] change Activetabindex

  1. #1

    [CLOSED] change Activetabindex

    hi,

    i have tabpanel with two tabs. All the tabs has aspx pages. Each aspx page has one button. when i click the button in aspx page i want to change the tabindex.<ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Height="300">

    <Tabs>
    <ext:Tab runat="server" Title="Tab 1" AutoLoadIFrame="Two.aspx" ID="ctl150">
    <Content>
    </Content>
    </ext:Tab>
    <ext:Tab runat="server" Title="Tab 2" AutoLoadIFrame="Three.aspx" ID="ctl151">
    <Content>
    </Content>
    </ext:Tab>
    <</Tabs>
    </ext:TabPanel>


    please help ..
    Thanks in advance..



    </PRE>
  2. #2

    RE: [CLOSED] change Activetabindex

    Hi,

    You would have to use JavaScript to change the active tab. The following forum thread details how to get an instance of a control in another Page using JavaScript, see*http://forums.ext.net/showthread.php?postid=2155.aspx


    Once you have an instance of the TabPanel, you can use the .setActiveTab() function. You can pass either the .ClientID of the Tab you want to become active or the index of the Tab you want to become active.


    Example


    TabPanel1.setActiveTab('ctl151'); // or, .setActiveTab(1);

    I think the following code sample, if added to Tab1, should change the parent ActiveTabIndex to Tab2. Although I would need you to post a full .aspx sample to confirm.


    Example


    window.parent.TabPanel1.setActiveTab(1);

    Hope this helps.


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] change Activetabindex


    The code is working fine. thank you

Similar Threads

  1. ActiveTabIndex
    By Yannis in forum 1.x Help
    Replies: 2
    Last Post: Jan 19, 2011, 1:12 AM
  2. Set value to ActiveTabIndex.
    By flaviodamaia in forum 1.x Help
    Replies: 3
    Last Post: Mar 26, 2010, 2:45 PM
  3. Replies: 0
    Last Post: May 20, 2009, 10:27 PM
  4. Replies: 4
    Last Post: Dec 03, 2008, 4:54 AM
  5. [CLOSED] ActiveTabIndex
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 18, 2008, 6:08 AM

Posting Permissions