Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on May 30, 2007 12:23
open dhtmlx forum
I initialise my tabbar through the _start.js file (only HTML structure). How can I refer to the tabbar object using javascript? I need to set a specific tab as active when I load my page. Thanks in advance

Answer posted on May 30, 2007 13:17
The ID of tabbar can be used as js reference for tabbar initialization.
    <div id="a_tabbar" class="dhtmlxTabBar" ...

<script>
    a_tabbar.setTabActive("b4");

But the decting of the moment when tabbar already initialized can be problematic, the latest version of tabbar ( not release yet ) support the special onInit event for such purpose
        <div onInit="custom_tab()" id="a_tabbar" class="dhtmlxTabBar" ...
<script>
function custom_tab(){
   a_tabbar.setTabActive("b4");
   
To get onInit method - please use attached js file instead of original one.


also , if you need only to select tab after init you can use "select" attribute
    <div onInit="custom_tab()" select="b4" id="a_tabbar" class="dhtmlxTabBar" ...

Attachments (1)
Answer posted by Andrei (Support) on Dec 10, 2014 02:54

If you haven't found the needed information there and still looking for a solution, you will find the additional help checking gantt char and php ajax event calendar.