addCheckbox(mode, nextToId, pos, itemId, itemText, state, disabled)
adds a new checkbox, sibling|child mode
File required:dhtmlxmenu.js
mode - (string) sibling|childnextToId - the item after which the checkbox will be added in the "sibling" mode or parent item's id in the "child" modepos - item's position in the child mode (null for sibling)itemId - id of a new checkboxitemText - text of a new checkboxstate - checked|uncheckeddisabled - enabled|disabledaddContextZone(zoneId)
adds a contextual zone to a contextual menu
File required:dhtmlxmenu.js
zoneId - id of the object on page to render as a contextual zoneaddNewChild(parentId, pos, itemId, itemText, disabled, imgEnabled, imgDisabled)
adds a new child item
File required:dhtmlxmenu.js
parentId - the item which will contain a new item in the sublevelposition - the position of a new itemitemId - id of a new itemitemText - text of a new itemdisabled - true|false, whether the item is disabled or notimg - image for the enabled itemimgDis - image for the disabled itemaddNewSeparator(nextToId, itemId)
add a new separator
File required:dhtmlxmenu.js
nextToId - id of the element after which a new separator will be inserteditemId - id of a new separatordisabled - true|false, whether the item is disabled or notaddNewSibling(nextToId, itemId, itemText, disabled, imgEnabled, imgDisabled)
adds a new sibling item
File required:dhtmlxmenu.js
nextToId - id of the element after which a new one will be inserteditemId - id of a new itemitemText - text of a new itemdisabled - true|false, whether the item is disabled or notimg - image for the enabled itemimgDis - image for the disabled itemaddRadioButton(mode, nextToId, pos, itemId, itemText, group, state, disabled)
adds a new radio button, sibling|child mode
File required:dhtmlxmenu.js
mode - (string) sibling|childnextToId - the item after which the radio button will be added in the "sibling" mode or parent item's id in the "child" modepos - the item's position in the child mode (null for sibling)itemId - id of a new radio buttonitemText - text of a new radio buttongroup - radiogroup's idstate - checked|uncheckeddisabled - enabled|disabledclearItemImage(id)
removes both enabled and disabled item images
File required:dhtmlxmenu.js
id - the itemenableDynamicLoading(url, icon)
enables dynamic loading of sublevels
File required:dhtmlxmenu.js
url - server-side script, transmitted params are action=loadMenu and parentIdicon - true|false, replaces elemet's arrow with loading image while loadinggetCheckboxState(id)
returns current checkbox's state
File required:dhtmlxmenu.js
id - the itemgetHotKey(id)
returns item's hot-key (just text)
File required:dhtmlxmenu.js
id - menu item's idgetItemImage(id)
returns item's image - array(img, imgDis)
File required:dhtmlxmenu.js
id - the itemgetItemPosition(id)
returns item's position in the current polygon
File required:dhtmlxmenu.js
id - the itemgetItemText(id)
returns item's text
File required:dhtmlxmenu.js
id - the itemgetItemType(id)
return item type by id
File required:dhtmlxmenu.js
idgetParentId(id)
returns parent's id
File required:dhtmlxmenu.js
id - the itemgetRadioChecked(group)
returns a checked radio button in the group
File required:dhtmlxmenu.js
group - radio button groupgetTooltip(id)
returns tooltip of a menu item
File required:dhtmlxmenu.js
id - menu item's idgetUserData(id, name)
returns item's userdata
File required:dhtmlxmenu.js
id - the itemname - the name of userdata (string)hide()
hides any open menu polygons
File required:dhtmlxmenu.js
hideContextMenu()
usercall to hide a contextual menu
File required:dhtmlxmenu.js
hideItem(id)
hides an item
File required:dhtmlxmenu.js
id - the item to hideisContextZone(zoneId)
returns true if an object is used as a contextual zone for the menu
File required:dhtmlxmenu.js
zoneId - id of the object to checkisItemEnabled(id)
returns true if the item is enabled
File required:dhtmlxmenu.js
id - the item to checkisItemHidden(id)
returns true if the item is hidden
File required:dhtmlxmenu.js
id - the item to checkloadFromHTML(objId, clearAfterAdd, onLoadFunction)
loads menu data from an html and calls onLoadFunction when loading is done
File required:dhtmlxmenu.js
object - html data containerclearAfterAdd - true|false, removes the container object after the data is loadedonLoadFunction - is called after the data is loaded (but before clearing html content if clear is set to true)loadXML(xmlFile, onLoadFunction)
loads menu data from an xml file and calls onLoadFunction when loading is done
File required:dhtmlxmenu.js
xmlFile - an xml file with webmenu dataonLoadFunction - a function that is called after loading is doneloadXMLString(xmlString, onLoadFunction)
loads menu data from an xml string and calls onLoadFunction when loading is done
File required:dhtmlxmenu.js
xmlFile - an xml string with webmenu dataonLoadFunction - function that is called after loading is doneremoveContextZone(zoneId)
removes an object from contextual zones list
File required:dhtmlxmenu.js
zoneId - id of a contextual zoneremoveItem(id)
removes an item from the menu with all nested sublevels
File required:dhtmlxmenu.js
id - id of the item for removingrenderAsContextMenu()
renders menu as contextual
File required:dhtmlxmenu.js
setAutoHideMode(mode)
sets to false to prevent hiding a contextual menu by a click
File required:dhtmlxmenu.js
mode - true/falsesetAutoShowMode(mode)
sets to false to prevent showing a contextual menu by a click
File required:dhtmlxmenu.js
mode - true/falsesetCheckboxState(id, state)
sets checkbox's state
File required:dhtmlxmenu.js
id - the itemstate - a new statesetHotKey(id, hkey)
sets menu hot-key (just text)
File required:dhtmlxmenu.js
id - menu item's idhkey - hot-key textsetIconsPath(path)
defines an url where necessary user embedded icons are located
File required:dhtmlxmenu.js
path - url to imagessetImagePath(path)
defines an url where necessary images are located
File required:dhtmlxmenu.js
path - url to imagessetItemDisabled(id)
disables an item
File required:dhtmlxmenu.js
id - item's id to disablesetItemEnabled(id)
enables an item
File required:dhtmlxmenu.js
id - item's id to enablestate - true|falsesetItemImage(id, img, imgDis)
sets an image for the item
File required:dhtmlxmenu.js
id - the itemimg - the image for the enabled item (empty string for none)imgDis - the image for the disabled item (empty string for none)setItemPosition(id, pos)
sets new item's position in the current polygon (moves an item inside the single level)
File required:dhtmlxmenu.js
id - the itempos - the position (int)setItemText(id, text)
sets text for the item
File required:dhtmlxmenu.js
id - the itemtext - a new textsetOpenMode(mode)
alias for setIconsPath
File required:dhtmlxmenu.js
mode - win|web, the default mode is web, in the win mode a user should click anywhere to hide the menu, in the web mode - just put the mouse pointer out of the menu areasetOpenMode(mode)
alias for setIconsPath
File required:dhtmlxmenu.js
mode - win|web, the default mode is web, in the win mode a user should click anywhere to hide the menu, in the web mode - just put the mouse pointer out of the menu areasetOverflowHeight(itemsNum)
limits the maximum number of visible items in polygons
File required:dhtmlxmenu.js
itemsNum - count of the maximum number of visible itemssetRadioChecked(group, id)
checks a radio button inside the group
File required:dhtmlxmenu.js
group - radio button groupid - radio button's idsetTooltip(id, tip)
sets tooltip for a menu item
File required:dhtmlxmenu.js
id - menu item's idtip - tooltipsetUserData(id, name, value)
sets userdata for an item
File required:dhtmlxmenu.js
id - the itemname - the name of userdata (string)value - the value of userdata (usually string)setVisibleArea(x1, x2, y1, y2)
sets the area in which the menu can appear, if the area is not set, the menu will occupy all available visible space
File required:dhtmlxmenu.js
x1, x2 - int, leftmost and rightmost coordinates by x axisy1, y2 - int, topmost and bottommost coordinates by y axissetWebModeTimeout(tm)
sets hide menu timeout (web mode only)
File required:dhtmlxmenu.js
tm - timeout, ms, 400 defaultshowContextMenu(x, y)
usercall to show a contextual menu
File required:dhtmlxmenu.js
x - position of the menu on x axisy - position of the menu on y axisshowItem(id)
shows an item
File required:dhtmlxmenu.js
id - the item to show