DHTML Lab: HierMenus CENTRAL: Version 5 Setup - Step 1
V5 Setup Instructions
Step 1 of 6
Four dummy functions are declared, HM_f_PopUp(), HM_f_PopDown(), popUp() and popDown(). These functions may be called by links in the document, links that are visible to all browsers. The actual functions are redeclared in the menu script later, for menu-enabled browsers. By placing these "dummy" functions here, older browsers will not generate an error when they encounter a menu-enabled link since they will find and execute these dummy versions. HM_f_PopUp() and HM_f_PopDown() are the actual functions declared in HierMenus; the other two functions are provided for compatibility with previous versions of HM that used popUp() and popDown().
Fourth generation browsers have a built-in event object, passed as an argument to HM_f_PopUp(). Old browsers do not have this object, so they consider event to be a user-defined variable. We must, therefore, define it as a dummy variable for these browsers to again avoid errors.
Note: If you are writing for an HM version 4+ environment only, and you are only using permanently visible menus (i.e., you are not using onMouseOver and onMouseOut within existing page links to display your menus - more on this later), you may omit this step. Cross-frames implementations must include this step, of course, since cross-frames implementations must use in-page links.
Produced by Peter Belesis and
Created: April 22, 2003
Revised: April 22, 2003