 |
|
We are currently working on providing HierMenus to you at no cost. HierMenus code requires a confirmed membership with internet.com. Please register by clicking here and come back soon to download your free copy of HeirMenus code.
|
|
 |

|
 |
 |
|
home / documentation / reference / hm_onbuildmenus
HM_OnBuildMenus
- Description:
- The custom (user defined) method that is called before the
initial menu build of each new page.
- Value:
- JavaScript function.
- Applies To:
- Globally.
- Browser Compatibility:
- HM_OnBuildMenus is supported in all browsers.
- Parameters:
- None.
- Comments:
- HM_OnBuildMenus is a HierMenus Menu Event Hook; a
means for you to execute your own custom JavaScript code from within normal
HierMenus processing. All menu event hooks expect to be set to the name of
a custom function (typically of your own creation, although the HM_Loader.js
file contains some custom functions designed for use with event hooks), a
function literal, or a dynamically generated function.
The function you create for use with this menu event hook should be designed
as a method of the default menu object, i.e., the internal object that HierMenus
creates to track the various default parameters that are assigned to all menus
(that do not themselves have more specific parameter settings). Thus, the
this keyword, within the context of your custom function, refers
directly to the default menu object. Unlike other menu event hooks,
HM_OnBuildMenus is not implemented as a method of a menu or
item element; therefore you must assign it within HM_f_UpdateDefaults
or HM_o_PageDefaults.
HM_OnBuildMenus will execute once per page load, typically just
after the page has finished loading, regardless of the CreateOnLoad
settings of individual menus. Even if all menus are defined with
CreateOnLoad set to false, HM_OnBuildMenus will
still fire.
For further usage and implementation information, see the mini-tutorial
Menu Event Hooks.
- Example Method:
// write a message to the status bar
// indicating the initial build of the menus
function HM_fc_MenuBuild() {
window.status="Now building hierarchical menus";
}
- Example Settings:
// Ok:
HM_OnBuildMenus:HM_fc_MenuBuild,
HM_OnBuildMenus:null, // remove hook for this menu
// Incorrect:
HM_OnBuildMenus:"HM_fc_MenuBuild",
// do not quote function names here
HM_OnBuildMenus:"null",
// do not quote null here
- Default:
- null
- See Also:
-
HM_OnVisibilityToggle,
HM_OnMove,
HM_OnCreateMenu,
HM_OnMenuCreated,
HM_OnItemHilite,
HM_OnItemClick,
HM_OnItemHover,
HM_OnCreateItem,
HM_OnItemCreated,
HM_OnMenuOver,
HM_OnMenuOut,
HM_OnItemOver,
HM_OnItemOut,
HM_OnLink,
setTrans,
killTrans,
Menu Event Hooks Mini-Tutorial
|
|