Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
731
How To change TAB using Javascript?
posted

i have two tabs with key "A" & key "B"

by default B tab is selected i want to select A using javascript please guide how to do this???

any help would be appriciated....

Parents
No Data
Reply
  • 24497
    posted

    Hi,

    UltraWebTab has javascript object which can be accessed by igtab_getTabById. That objects has various member variables and methods. Please look at the docs for client side model. Below is example to change tab on client:

     

     

     

     

     

     

     

     

     

     

    <script type="text/javascript">
    function selectTabA()
    {
     
    var webTab = igtab_getTabById('<%=UltraWebTab1.ClientID%>');
     
    if(!webTab){alert('not found');return;}
     
    var tab = webTab.tabFromKey('B');
     webTab.setSelectedTab(tab);
     
    //webTab.setSelectedIndex(1);
    }
    </script>

     

     

    <input type="button" value="ChangeTab" onclick="selectTabA()" />
    <igtab:UltraWebTab ID="UltraWebTab1" runat="server" ...

Children