|
home / documentation / reference / menuid
MenuID
- Description:
- The unique identifier for the menu.
- Value:
- String, or JavaScript expression that returns a string.
MenuID must begin with a letter, and may contain letters,
numbers, hyphens (-), and underscores (_). Spaces are not allowed.
- Applies To:
- Menus and Menu Items.
- Browser Compatibility:
- MenuID is supported in all browsers.
- Comments:
- MenuID serves as the unique id for the menu
element that is created on the HTML page, as well as the unique id for the menu
in HierMenus own internal processing. MenuID must begin with a letter,
and may contain letters, numbers, hyphens, and underscores. Spaces are not
allowed.
MenuID must be unique not only within your menu sets themselves
(each new menu must have a unique MenuID) but within your HTML page
as a whole. That is, if you already have an element in your page designated
like this:
<img id="fooBar" .... >
then you may have no menus with a MenuID of fooBar. Therefore,
we recommend that you use some type of unique prefix for each of your menu
ids; such as hm_ to avoid the possibility of encroaching on an id
that already exists within your page.
MenuID should be applied as a string, which means the
value you supply should always be in quotes. It is a required parameter for
every menu and item registered in HM. Without it, the menu and/or menu item
will be ignored. In the case of menu items, MenuID is the menu to
which this menu item should be added.
MenuID is case sensitive.
- Examples:
// Ok:
MenuID:"hm_products",
MenuID:window.hmPrefix+"products",
// concatenated the user defined variable hmPrefix
// with "products" to arrive at the MenuID
// Incorrect:
MenuID:hm_products, // quotes required
MenuID:"10thMenu", // must begin with a letter
MenuID:"TopTen%", // % not allowed
MenuID:"Products Menu", // spaces not allowed
MenuID:'window.hmPrefix+"products"',
// no quoted expressions
- Default:
- null
- See Also:
- ChildID,
ItemIDSuffix
|