http://milonic.com/menu_methods.php says:
"menuDisplay displays a menu. You need to have a reference to a menu or other HTML object and show/hide is boolean value:
Syntax is menuDisplay(gmobj("menuname"),1) to show and menuDisplay(gmobj("menuname"),0) to hide."
"closeAllMenus will hide ALL menus, even if they are visible but moved out of view. This command is used to clear the screen of unwanted menus."
I made a test:
menu_data.js
Code: Select all
...
with(milonic=new menuname("menuname"))
{
position="relative"; alwaysvisible=0; orientation="horizontal"; style=menuStyle;
aI("text=menuitem0;url=#;");
aI("text=menuitem1;url=#;");
aI("text=menuitem2;url=#;");
}
drawMenus();
Code: Select all
...
<a href="#" onclick="javascript:menuDisplay(gmobj("menuname"),1)">Close all menus</a>
<a href="#" onclick="javascript:closeAllMenus();">Close all menus</a>
...
If I change the property alwaysvisible to 1, I can't hide the menu with the method closeAllMenus(),
and if it is null or 0 the menu is hidden and I can't get it visible with method menuDisplay.
What should I do?