DHTMLX Docs & Samples Explorer

### Attaching dhtmlxMenu to Modal Window

Source

    <!-- dhtmlxWindows -->
    <link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxwindows.css">
    <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxwindows_dhx_skyblue.css">
    <script src="../../codebase/dhtmlxcommon.js"></script>
    <script src="../../codebase/dhtmlxwindows.js"></script>
    <!-- dhtmlxMenu -->
    <script src="../../../dhtmlxMenu/codebase/dhtmlxmenu.js"></script>
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxMenu/codebase/skins/dhtmlxmenu_dhx_skyblue.css">
    <script src="../../codebase/dhtmlxcontainer.js"></script>

    <div id="winVP" style="position: relative; height: 500px; border: #cecece 1px solid; margin: 10px;"></div>
    <script>var dhxWins,
    w1,
    menu;
    function doOnLoad() {
        dhxWins = new dhtmlXWindows();
        dhxWins.enableAutoViewport(false);
        dhxWins.attachViewportTo("winVP");
        dhxWins.setImagePath("../../codebase/imgs/");
        w1 = dhxWins.createWindow("w1", 20, 30, 400, 350);
        w1.setText("Attach dhtmlxMenu to Modal Window");
        w1.setModal(true);
        w1.attachURL("../common/attach_url_ajax_inner.html", true);
        menu = w1.attachMenu();
        menu.setImagePath("../../../dhtmlxMenu/codebase/imgs/");
        menu.setIconsPath("../../../dhtmlxMenu/samples/common/imgs/");
        menu.loadXML("../../../dhtmlxMenu/samples/common/dhxmenu.xml?" + new Date().getTime());
    }</script>