DHTML Lab: Hierarchical Menus Ver. 2 - Addendum (v2.1) | 2
Hierarchical Menus Ver. 2 - Addendum (v2.1)
| |||
Click the links above to reveal menus. Click the button above for frame-related mods. |
As you know, the menus appear when the user mouses over any link, text or otherwise, that includes the following event handlers: <A HREF="url.html" onMouseOver="popUp('elMenu1',event)" onMouseOut="popDown('elMenu1')">Webreference</A> If we wanted the menus to appear upon a user click, we can simply change the HTML to: <A HREF="url.html" onClick="if(isMenu){popUp('elMenu1',event);return false}" onMouseOut="popDown('elMenu1')">Webreference</A> Note the following:
Limitation to Using onClickIn a frameset document, when a new page is loaded into the "main" frame, the menus have to be re-created. In version 2, this is accomplished when the user mouses over any menu-associated link. If you change to using onClick, this re-creation will only occur when the user clicks, resulting in a possibly undesirable delay in menu appearance. In version 3, we'll attempt to overcome this delay for those who wish to use click. On the next page, we'll discuss the association of any legal URL with a menu item. |
Produced by Peter Belesis and
All Rights Reserved. Legal Notices.Created: June 29, 1998
Revised: June 29, 1998
URL: https://www.webreference.com/dhtml/column20/addendum/col20add2.html