Please Note:
HierMenus is protected by copyright laws. Use of the HierMenus code requires a paid licensing agreement.
Click Here to Register

Site Navigation
Bulletins
About
Documentation
FAQ
Samples
Known Issues
Technology Jobs

internet.commerce

Partner With Us














          
internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 
HierMenusCentral Enhance the Functionality of Your Web Site with DHTML HierMenus.
    

home / documentation / reference / hm_onmenuout

HM_OnMenuOut

Description:
The custom (user defined) method that is called when the user rolls their mouse off of a menu.

Value:
JavaScript function.

Applies To:
Menus.

Browser Compatibility:
HM_OnMenuOut is supported in all browsers.

Parameters:
(menuEl)

menuEl is the HTML element for the menu

Comments:
HM_OnMenuOut 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 menu object, i.e., the internal menu object that HierMenus creates to track the various unique parameters of the menu itself. Thus, the this keyword, within the context of your custom function, refers directly to the menu object.

The menu object (referred to by this) is not the same as the menu element. The menu object is the internal structure that HierMenus uses to track various pieces of information specific to this menu. The menu element is the actual HTML page element that represents the menu itself. You access the menu object via the this keyword within your custom method; you access the menu element via the first parameter passed to the function.

When using HM_OnMenuOut note that it is not guaranteed that the action that is being called for is strictly necessary on the menu. Most browsers will refire the mouseout event on an element repeatedly as the mouse rolls over elements that are themselves contained within the target element. HierMenus attempts to avoid this behavior (i.e., HierMenus attempts to call the mouseout handler for the menu only once, when the mouse actually leaves the menu element) but this cannot be relied upon for all browsers. Your methods will need to be designed with this fact in mind.

For further usage and implementation information, see the mini-tutorial Menu Event Hooks.

Example Method:
// write a message to the status 
// bar when the user rolls off a menu
function HM_fc_MenuOut() {
   window.status="Thanks for visiting menu "+this.MenuID+"!";
}
Example Settings:
// Ok:
HM_OnMenuOut:HM_fc_MenuOut,
HM_OnMenuOut:null,  // remove hook for this menu

// Incorrect:
HM_OnMenuOut:"HM_fc_MenuOut",
   // do not quote function names here
HM_OnMenuOut:"null", 
   // do not quote null here
Default:
null

See Also:
HM_OnMove, HM_OnVisibilityToggle, HM_OnCreateMenu, HM_OnMenuCreated, HM_OnItemHilite, HM_OnBuildMenus, HM_OnItemClick, HM_OnItemHover, HM_OnCreateItem, HM_OnItemCreated, HM_OnMenuOver, HM_OnItemOver, HM_OnItemOut, HM_OnLink, setTrans, killTrans, Menu Event Hooks Mini-Tutorial



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Created: 3/25/2004
Updated: 3/25/2004
URL: http://www.hiermenuscentral.com/documentation/reference/hm_onmenuout.html