DHTMLX Tabbar

Hi
I am using dhtmlx tabbar with iframe mode.
The problem i am facing is that size of tabs is not that i mention. Only the tab that i set active in init function is of correct size.
The code for this is following.

var tabbar;
function doInitTabbedPage(result)
{
    tabbar=new dhtmlXTabBar(“a_tabbar”,“top”);
    tabbar.setImagePath("…/common/dhtmlx/imgs/");
    tabbar.setSize(692,427,true);
    tabbar.setHrefMode(“iframes”);
    var records = result.split("::");
    var active = records[0].split("^^")[0];
    tempid = active;
    for (var i =0; i < records.length  ; i++)
    {
        var tempvar = new String(records[i]);
        str_recordsTC = tempvar.split("^^");
        tabbar.addTab(str_recordsTC[0], str_recordsTC[1], “120px”);
        var href = “category.php?cid=” + str_recordsTC[0] + “&bid=” + Select.getSelectedValue(“buildingList”);
        tabbar.setContentHref(str_recordsTC[0],href);
    }
    tabbar.setTabActive(active);
}


Please be sure that str_recordsTC[0] in above code snippet is unique for each tab.


The second part of problem can be related to the sizing of elements inside iframe - the content is loaded when container is in hidden state, so if you have some active logic for size settings, it may fail.
You can try to change loading logic as
tabbar.setHrefMode(“iframes-on-demand”);
In such case, data will load only when tab switched to visible state