Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:27
Click brings up submenu
Poster: edweill
Dated: Wednesday May 26 2004 - 16:52:16 BST
I have been trying for a couple of days to get a submenu to come up on click instead of on rollover. It would be preferable if we could have this within a milonic menu, but I even a solution with the first level outside would be greatly appreciated.
The current system is another menu and we are having compatablilty issues with MAC browsers, so, since the milonic menu looked so good, I decided to try it.
current url = http://lisibroker.com/index.shtml
This menu is also embedded in a table, which adds it's own complications.
Ed
Poster: John
Dated: Wednesday May 26 2004 - 17:11:59 BST
Ed, I don't see our menu system at that URL.
As for the click open, see openonclick= and closeonclick= at http://www.milonic.com/itemproperties.php.
Click brings up submenu
Poster: edweill
Dated: Wednesday May 26 2004 - 17:59:06 BST
You are correct, your menu is not there since I cannot get it to work as I want.
I am not sure how to implement the openonclick as the reference you gave me lists no arguments. I tried :
with(milonic=new menuname("Main Menu")){
style=MainMenuStyle;
screenposition="left";
top=90;
followscroll="1";
alwaysvisible=1;
openonclick=1;
aI("text=Home;url=javascript:trak('/index.shtml');status=Back To Home Page;bgimage=/i/menubgdn.gif;overbgimage=/i/menubgup.gif;");
aI("text=About Us;showmenu=About;bgimage=/i/menubgdn.gif;overbgimage=/i/menubgup.gif;");
aI("text=Product Info;showmenu=Product;bgimage=/i/menubgdn.gif;overbgimage=/i/menubgup.gif;");
aI("text=Online Quotes;showmenu=Quotes;bgimage=/i/menubgdn.gif;overbgimage=/i/menubgup.gif;");
aI("text=Download Forms;showmenu=Download;bgimage=/i/menubgdn.gif;overbgimage=/i/menubgup.gif;");
aI("text=Sales Tools;showmenu=Tools;bgimage=/i/menubgdn.gif;overbgimage=/i/menubgup.gif;");
aI("text=Industry News;showmenu=News;bgimage=/i/menubgdn.gif;overbgimage=/i/menubgup.gif;");
aI("text=Individual Life;showmenu=Life;bgimage=/i/menubgdn.gif;overbgimage=/i/menubgup.gif;");
}
but this still in rollover activation:
http://lisibrokerstaging.com.xohost.com/t5.shtml
How do I change this to make it work?
I am also interested in attaching the login javascript to the menu so they float together.
Poster: John
Dated: Wednesday May 26 2004 - 21:22:06 BST
Put the openonclick=1; in your MainMenuStyle.
Poster: kevin3442
Dated: Wednesday May 26 2004 - 21:36:25 BST
Yes, openonclick is to be used either as a menu style property (as John said) or as an item property. If you use it in a menu style, it is important to set it in the style used by the menu doing the opening, not in the style (if its a different one) of the menu to be opened. You can also use openonclick on an item-by-item basis, by setting it in the aI() string of the menu item that opens the submenu.
Another, little-known property that is useful in conjunction with openonclick is
Code:
retainClickValue=1;
Note that the capital C and V are important in retainClickValue. It's not really a style, menu, or item property, but rather a system-wide property. You set it along with the other global variables that normally appear at the top of your menu_data.js file, e.g.:
Code:
retainClickValue=1;
_menuCloseDelay=500;
_menuOpenDelay=0;
_subOffsetTop=4;
_subOffsetLeft=-7;
_menuCloseDelay=500;
_menuOpenDelay=0;
_subOffsetTop=4;
_subOffsetLeft=-7;
With retainClickValue=1, you can open the first submenu with a click on the calling menu item, but once a submenu is open, other submenus from the same "main" menu will open just by mousing over the other main menu items. This is much like a menu in a Windows application, where you have to click a main menu item to open the submenu, but once a submenu is open, you can simply mouse over other main menu items to open their submenus. Once all submenus are closed (i.e., the user is completely out of the menus), then another click will be required to open a submenu.
With retainClickValue=0, or if it simply doesn't exist in menu_data.js, and with openonclic=1, you have to click on each main menu item to open its associated submenu.
Hope that helps,
Kevin
Thanks
Poster: edweill
Dated: Wednesday May 26 2004 - 21:51:25 BST
Those all helped a lot with getting the menu to work from the click! Thanks for the rapid responses!
I have two other questions, but I will start them as separate threads
Safari Browser and openonclick
Poster: Maestro
Dated: Friday December 24 2004 - 0:00:07 GMT
I followed the suggestions given above..
Quote:
..place openonclick=1; in with the style associated with the menu using the style.
And make sure the menu using the style is the "calling" menu, not the one being called.
And make sure the menu using the style is the "calling" menu, not the one being called.
.. it worked; but not in Safari!
Is there a fix?
Now it suddenly does work in Safari!
Poster: Maestro
Dated: Friday December 24 2004 - 0:09:34 GMT
Strange..
Now it suddenly works
Never mind.