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
Promotional Golf
Imprinted Gifts
Server Racks
Baby Photo Contest
Online Shopping
Hurricane Shutters
Imprinted Promotions
Promotional Products
Online Education
Promotional Items
Home Improvement
Find Software
Dental Insurance
Logo Design

          
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_onmove

HM_OnMove

Description:
The custom (user defined) method that is called whenever HierMenus is about to move a menu.

Value:
JavaScript function.

Applies To:
Menus.

Browser Compatibility:
HM_OnMove is supported in all browsers.

Parameters:
(menuEl,xPos,yPos)

menuEl is the HTML element for the menu

xPos is the x (left) pixel location that the menu is about to be moved to. xPos is passed as an integer.

yPos is the y (top) pixel location that the menu is about to be moved to. yPos is passed as an integer.

Comments:
HM_OnMove 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_OnMove note that it is not guaranteed that the action that is being called for is strictly necessary on the menu. For example, HierMenus may call for a menu to be moved to a location when, in fact, it is already at that location. If strict adherence to actual menu movement is necessary for your use, then you may wish to check the current location of the menu element before proceeding with your function.

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

Example Method:
// write a message to the status bar 
// describing the movement of a menu
function HM_fc_MenuMove(menuEl,xPos,yPos) {
   window.status="Moving "+this.MenuID+" to ("+xPos+","+yPos+")";
}
Example Settings:
// Ok:
HM_OnMove:HM_fc_MenuMove,
HM_OnMove:null,  // remove hook for this menu

// Incorrect:
HM_OnMove:"HM_fc_MenuMove",
   // do not quote function names here
HM_OnMove:"null", 
   // do not quote null here
Default:
null

See Also:
HM_OnVisibilityToggle, HM_OnCreateMenu, HM_OnMenuCreated, HM_OnItemHilite, HM_OnBuildMenus, 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



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

Solutions
Whitepapers and eBooks
IBM eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
Created: 3/25/2004
Updated: 3/25/2004
URL: http://www.hiermenuscentral.com/documentation/reference/hm_onmove.html