# dhtmlxmenu:api_method_dhtmlxmenuobject_iscontextzone [DHX documentation]

DHTMLX Docs & Samples Explorer

Index
dhtmlxmenu
API Methods

### isContextZone(zoneId)

Required library edition:
Required library file: dhtmlxmenu.js

returns true if an object is used as a contextual zone for the menu

- zoneId - id of the object to check

for example body contain div which will used as context zone

        <body>
            <div id="myMenu"> </menu>
        </body>

now check if it context zone, add it as context zone and check again

        var menu = new dhtmlXMenuObject();
        menu.renderAsContextMenu();
        // check if <div id="myMenu"> is context zone
        var isZone = menu.isContextZone("myMenu"); // return false, not assigned yet
        // add context zone
        menu.addCOntextZone("myMenu");
        // check again
        var isZone2 = menu.isContextZone("myMenu"); // return true