DHTMLX Docs & Samples Explorer

Attach Tabbar

Source
<meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxToolbar/codebase/skins/dhtmlxtoolbar_dhx_skyblue.css"/>
    <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxpopup_dhx_skyblue.css"/>
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxTabbar/codebase/dhtmlxtabbar.css">
    
    <script src="../../codebase/dhtmlxcommon.js"></script>
    <script src="../../../dhtmlxToolbar/codebase/dhtmlxtoolbar.js"></script>
    <script src="../../../dhtmlxTabbar/codebase/dhtmlxcontainer.js"></script>
    <script src="../../../dhtmlxTabbar/codebase/dhtmlxtabbar.js"></script>
    <script src="../../codebase/dhtmlxpopup.js"></script>
    
    <style>
        #myToolbar {
            margin: 10px;
        }
    </style>
    <script>
 
var myToolbar;
var myPop;
var myTabbar;
 
function doOnLoad() {
 
    myToolbar = new dhtmlXToolbarObject("myToolbar", "dhx_skyblue");
    myToolbar.setIconsPath("../common/imgs/");
    myToolbar.loadXML("../common/toolbar.xml?etc=" + new Date().getTime(), function() {
 
        myToolbar.setItemText("workbut", "Tabbar");
 
        myPop = new dhtmlXPopup({
            toolbar: myToolbar,
            id: "workbut"
        });
        myPop.attachEvent("onShow", function() {
            if (!myTabbar) {
                myTabbar = myPop.attachTabbar(350, 300);
                myTabbar.setImagePath("../../../dhtmlxTabbar/codebase/imgs/");
                myTabbar.loadXML("../common/tabbar.xml?etc=" + new Date().getTime());
            }
        });
 
    });
 
}
</script> <style> </style> <div id="myToolbar"></div>