I have an issue using version 3.5.15. I have a number of menu sets on on page that currently act independantly of eachother. One static menu for the top navigation and various menu sets that are supose to show/hide based on a selection from the top ("Click" and sidebar menu stays until another selection from the top is made). The top navigation is always the same, however when you select an option in the top navigation I would like to be able to hide/show the corresponding menu in the sidebar manually (setting a variable or making some function call) and have it stay visible until another selection is made from the top. I have looked at the code, but it is so obsure that I have a tough time deciphering the meaning of the variables. I have been programming javascript for a number of years so technical answers are ok.
Thanks in advance for any help,
Nicholas
Hiding Menus Manually / Showing Menus Manually
Hi Nicholas,
Here are a couple of functions that might help:
mm_showMenu() takes the name of the menu you want to open as it's first parameter (menuName), and the Always Visible state as an optional second parameter (alwaysVis). For example, suppose you want to open a menu named "sidemenu". You would call:
The 1 in the second parameter sets the menu's Always Visible property, so the menu will not close until you do so programatically, using the mm_hideMenu() function, shown below.
mm_hideMenu() does what it suggests: hides the named menu. If you wanted to close "sidemenu" you would call
Note that the 0 to clear the Always Visible property is not really necessary (you can actually programatically hide a menu even if it's Always Visible property is set), but it makes logical sense, especially if you want to open the same menu for some other reason, then have it disappear automatically when the user mouses out of it.
Hope that helps,
Kevin
Here are a couple of functions that might help:
Code: Select all
function mm_showMenu(menuName) // + , alwaysVis)
{
var menuNum = getMenuByName(menuName);
if (arguments.length > 1) {
var menuArr = eval("menu" + menuNum);
menuArr[7] = arguments[1];
}
SDiv("menu" + menuNum, 1);
}
Code: Select all
mm_showMenu('sidemenu', 1);
Code: Select all
function mm_hideMenu(menuName) // + , alwaysVis)
{
var menuNum = getMenuByName(menuName);
if (arguments.length > 1) {
var menuArr = eval("menu" + menuNum);
menuArr[7] = arguments[1];
}
SDiv("menu" + menuNum, 0);
}
Code: Select all
mm_hideMenu('sidemenu', 0)
Hope that helps,
Kevin