DHTMLX Docs & Samples Explorer

### Attach dhtmlxMenu to Layout's Top

Source

    <!--
    -->

    <link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxlayout.css">
    <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxlayout_dhx_skyblue.css">
    <script src="../../../dhtmlxMenu/codebase/dhtmlxcommon.js"></script>
    <script src="../../codebase/dhtmlxlayout.js"></script>
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxMenu/codebase/skins/dhtmlxmenu_dhx_skyblue.css">
    <script src="../../../dhtmlxMenu/codebase/dhtmlxmenu.js"></script>
    <script src="../../codebase/dhtmlxcontainer.js"></script>

    <div id="parentId" style="position: relative; top: 20px; left: 20px; width: 600px; height: 400px; aborder: #B5CDE4 1px solid;"></div>
    <script>var dhxLayout,
    dhxMenu;
    function doOnLoad() {
        dhxLayout = new dhtmlXLayoutObject("parentId", "3L");
        dhxMenu = dhxLayout.attachMenu();
        dhxMenu.setIconsPath("../../../dhtmlxMenu/samples/common/imgs/");
        dhxMenu.loadXML("../../../dhtmlxMenu/samples/common/dhxmenu.xml?etc=" + new Date().getTime());
    }</script>