Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Vladimir Lopez on May 19, 2008 10:00
open dhtmlx forum
set active tab

How can i set a tab active?, i have initialized the tabbar from html.
Answer posted by Support on May 19, 2008 10:06

You can set it directly from HTML through "select" attribute

<div select="true" ....

Or in any moment after tabbar initialization by JS API

tabbar.setTabActive(true)

Answer posted by Vladimir Lopez on May 19, 2008 10:14
sorry it doesnt work with the select attribute, what i want to do is to be able to set a tab active from a click of another button, and i  would like to keep the tabbar initialization with html.
Answer posted by Support on May 20, 2008 05:19
You can use js API as

<div id="a_tabbar" class="dhtmlxTabBar" imgpath="../../codebase/imgs/" style="width:398; height:395;"  skinColors="#FCFBFC,#F4F3EE" >
                    <div id="a1" width="100" name="Profiles" ><img src="../images/page_a.gif"></div>
.....


<input type="button" value="select" onclick="a_tabbar.setTabActive('a1');" />
Answer posted by Steven on Sep 11, 2008 02:20
Is there any way to do this for HTML?
Answer posted by Support on Sep 11, 2008 02:53
>>Is there any way to do this for HTML?
If you want to select tab directly during init - use "select" attribute ( first answer above )

If you want to select some tab from external button, while init original tabbar from HTML - it can be done by using setTabActive command ( second answer above )