Initialize object on page
Parameters passed to the constructor are:
object to attach menu to (should be loaded before calling constructor)
width of the menu
height of the menu
Menu caption (optional)
Vertical mode flag (optional)
Additional initialisation methods:
loadXML(url) - load menu config from xml
showBar() - show menu
Set Event Handlers
Selected button ID will be passed to function specified as argument for setOnClickHandler(funcObj)
Adding Items with Script
For list of initialisation parametrs see documentation on relative objects
Configuring with XML
XML Syntax:
<menu> node is mandatory. It specifies parametrs global to all menu, all optional
Optional parameters for this tag are:
name - menu caption
width - menu width
height - menu height
mode - menu design. can be "classic" - default windows like menu, "popup" - context menu style, "alfa" "betta" - mixed styles
disableType - if set to "image", then disabled items change their image, else only CSS changed
absolutePosition - positioning method of menu, allowed values: "absolute, relative, auto"
menuAlign - align of items in menu
globalCss - CSS class for menu items instead of default
globalSecondCss - CSS class for menu items on child menu panels
globalTextCss - CSS class for items text instead of default
type - menu buttons type, can be :"a1","a2","a3","b1","b2","b3" (default a2)
a1 - image doesn't has own css style, selection over all button, without borders
a2 - image doesn't has own css style, selection over all button, with borders
a3 - image has own css style, selection over text only, with borders
b1 - image has own css style, selection over all button, without borders
b2 - image has own css style, selection over all button, with borders
b3 - image has own css style, selection over text only, with borders
withoutImages - all child menu items can not have images, attribute src will be ignored
mixedImages - child menu items can have or not have images,based on src attribute
<MenuItem> menu item with image and text
Mandatory parameters for this tag are:
src - src of image
id - id of the button
Optional parameters for this tag are:
width - button width
height - button height
disableImage - alternative image src, for disabled state
tooltip - button tooltip
Examples of menu items manipulation
Link navigation menu
For creation link navigation menu you need not any additional js instriction,
simple write neccesary links as "href" attribute of xml "MenuItem" tags.
You also can write "target" attribute, which will be used as a target for link.
(By default link loaded in current document)
XML Syntax:
Context menu