Loading ...
Sorry, an error occurred while loading the content.

Programmatically select tab in TabView?

Expand Messages
  • Snigdhendu
    Hi I am trying to activate a tab programmatically by javascript (suppose, by a button click or a hyperlink etc). Unfortunately, I am unable to find any clue on
    Message 1 of 2 , Mar 27, 2007
    • 0 Attachment
      Hi

      I am trying to activate a tab programmatically by javascript (suppose,
      by a button click or a hyperlink etc). Unfortunately, I am unable to
      find any clue on how to select a tab by some js code, instead of user
      clicking on the tab itself.

      Please helpÂ….

      Thanks.
    • Gopalarathnam Venkatesan
      ... You can use the set() method of the Tabview to select the tab automatically. Assuming menuTabs is the Tabview object, then: menuTabs.set( activeIndex ,
      Message 2 of 2 , Mar 27, 2007
      • 0 Attachment
        Snigdhendu wrote:
        >
        >
        > Hi
        >
        > I am trying to activate a tab programmatically by javascript (suppose,
        > by a button click or a hyperlink etc). Unfortunately, I am unable to
        > find any clue on how to select a tab by some js code, instead of user
        > clicking on the tab itself.
        >
        > Please help….
        >

        You can use the set() method of the Tabview to select the tab automatically.

        Assuming "menuTabs" is the Tabview object, then:

        menuTabs.set("activeIndex", 0); // selects the first tab
        menuTabs.set("activeIndex", 1); // selects the second tab

        HTH.

        --
        Gopalarathnam Venkatesan

        http://gopalarathnam.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.