Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by MHW on Jul 02, 2009 17:37
open dhtmlx forum
set active tab

I have a Tabber with a Window. When the page loads, I want the first tab (a1) to be 'opened' in order to display the tab content. However, none on the tabs appears to be active. I'd appreciate some assistance in getting this to work. Thanks in advance.

Here's my tabber xml:
<tabbar hrefmode="iframes">
    <row>
        <tab id="a1" width='120px' href="dashboards.php">My Dashboards</tab>
        <tab id="a2" width='140px' href="ramp-management.php">RAMP Management</tab>
        <tab id="a3" width='180px' href="configuration-management.php">Configuration Management</tab>
        <tab id="a4" width='140px' href="alarm-management.php">Alarm Management</tab>
        <tab id="a5" width='190px' href="work-management.php">Work Management</tab>
        <tab id="a6" width='150px' href="http://preview.ws/pv/cmdev">Carbon Modeller</tab>
    </row>
</tabbar>

Here's my js/html:
window.onload = function() {
...
    var dhxWins = new dhtmlXWindows();
    dhxWins.enableAutoViewport(false);
    dhxWins.setViewport(myCanvasWidthPad, myCanvasHeightPad, myCanvasWidthSize, myCanvasHeightSize, document.getElementById("myVP"));
    dhxWins.vp.style.border = "#909090 1px solid";
    dhxWins.setImagePath("js/dhtmlxWindows/codebase/imgs/");
    dhxWins.attachViewportTo("myVP");
    var w1 = dhxWins.createWindow("w1", 0, 0, myCanvasWidthSize, myCanvasHeightSize);
    
    w1.setText("High Level Visual Concept");
    w1.hideHeader();

    var tabbar = w1.attachTabbar();
    tabbar.setImagePath("js/dhtmlxTabbar/codebase/imgs/");
    tabbar.loadXML("awtabbar.xml?"+new Date().getTime());
    
}

Answer posted by Stanislav on Jul 03, 2009 15:01
You can update your XML as 
 <tab id="a1" width='120px' selected='true' href="dashboards.php">My Dashboards</tab>
Answer posted by MHW on Jul 03, 2009 15:44
Thank you