Check documentation for the latest version of dhtmlxSuite isContextZone DHTMLX Docs

isContextZone

checks whether an object is used as a context zone for the menu

boolean isContextZone(string zoneId);
zoneIdstringid of the object to check
booleantrue - object is used as a context menu, false - it isn't

Example

<!-- define a div which will be used as a context zone -->
 
<body>
    <div id="Cnt_zone"></div>
</body>
 
 
//check whether it's a context zone, add it as a context zone and check again
var menu = new dhtmlXMenuObject();
myMenu.renderAsContextMenu();
var isZone = myMenu.isContextZone("Cnt_zone"); // returns false, not assigned yet
myMenu.addContextZone("Cnt_zone");
var isZone2 = myMenu.isContextZone("Cnt_zone"); // returns true

See also
Back to top