How to activate TabPanel Tab from child page (help me, or the curiosity will kill me)

  1. #1

    How to activate TabPanel Tab from child page (help me, or the curiosity will kill me)

    Hello everyone
    in some forum posts I've seen a javascript to add a Tab in a TabPanel of a Child page.
    I would like only to activate the tab, please can you help me?
    Let me explain my situation:
    In Default.aspx I have a TabPanel with two tabs, Tab1 and Tab2.
    In Tab1 and Tab2 load two pages, pageOne.aspx in Tab1 and PageTwo.aspx in Tab2.
    I would like to click button in PageTwo.aspx that selects the Tab1 of the TabPanel in Default.aspx .
    Can I do this?

    I hope that I explained well and I hope that some good-hearted person help me
    Thank you very much
    Fabrizio
  2. #2
    Hi,

    Within the child page, you just prefix your component id with "parent.".

    The following sample demonstrates setting the active tab index of the TabPanel to the first tab, from inside the second.

    Example

    parent.TabPanel1.setActiveTab(0);
    
    // or, by the tab client-side id
    
    parent.TabPanel1.setActiveTab(parent.Panel1);
    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Hi geoffrey,
    thanks a lot for the reply,
    but i execute the
       parent.TabPanel1.setActiveTab(0);
    from one .aspx page loaded into Tab2 with Autoload Panel's property and I get an error with this code

    into practice in tab2 load a page for user registration and at the end of the regitrationI want to go back toTab1, which loads the home page.
    Basically I do a redirect, but the problem is that the home page is loaded in Tab2.

    If you can help me thank you very much

    Fabrizio
  4. #4

    OK works perfectly

    Thanks Geoffrey, I was wrong, it's perfect
    thank you very much
    Fabrizio

Similar Threads

  1. Replies: 1
    Last Post: May 18, 2012, 1:52 PM
  2. Replies: 0
    Last Post: May 07, 2012, 7:50 AM
  3. Replies: 1
    Last Post: Feb 03, 2012, 2:36 PM
  4. Tabpanel - Autoload only on tab click/Activate
    By Tbaseflug in forum 1.x Help
    Replies: 5
    Last Post: Sep 01, 2009, 5:17 PM
  5. Tabpanel / Tab activate event
    By locoperoguapo in forum 1.x Help
    Replies: 1
    Last Post: Feb 17, 2009, 1:09 PM

Tags for this Thread

Posting Permissions