Show and hide menus using code

Display menu1   Display menu2

Both menus are using the "Manually Trigger Groups as popup menus" positioning method (they do not appear unless triggered by code). They also have STICKY submenus (they disappear when you click somewhere on page).

The above links use the following code to SHOW and HIDE the two different menus.

<a href="#" onmouseover="awmShowMenu('popup_shmenu1');awmHideMenu('popup_shmenu2')">Display menu1</a>

<a href="#" onmouseover="awmShowMenu('popup_shmenu2');awmHideMenu('popup_shmenu1')">Display menu2</a>

For more information on how the awmShowMenu() and awmHideMenu() functions work, you can read the AllWebMenus HELP section of the <PopUp> property.

Since version 4.1 (release date August 18, 2005) you can achieve the same result easier by creating a single menu with 2 submenu groups and trigger each group using the awmShowGroup() function instead. Using this method you do not need to use the awmHideMenu() function at all, since a group automatically closes all other groups of the same menu when it is triggered. In addition, you are using a single menu-linking code instead of two. You can find more information about this feature on the <Positioning> topic of the AllWebMenus HELP ("Method 2" of topic) as well as the related Live Example on the AllWebMenus installation.

Note: The awmHideMenu() function is available from version v3.1.524 (release date June 21, 2004) and above only.

See also:
Popup Menus appearing on Mouse Over
Popup Menus appearing on Mouse Right-Click
   
Fatal error: Uncaught Error: Call to undefined function common_likno_google_analytics() in /usr/home/frames/public_html/likno/examples/example_showhidemenu.html:87 Stack trace: #0 {main} thrown in /usr/home/frames/public_html/likno/examples/example_showhidemenu.html on line 87