DHTMLX Docs & Samples Explorer

### Context Menu Object API Init

Source

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

    <div style="height: 400px; position: relative;">
        <div id="contextArea" style="position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;"></div>
    </div>
    <script>var menu;
    function initMenu() {
        var menuData = {
            parent: "contextArea",
            context: true,
            icon_path: "../common/imgs/",
            xml: "../common/dhxmenu.xml";
        };
        menu = new dhtmlXMenuObject(menuData);
    }</script>