Click brings up submenu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
edweill
Beginner
Beginner
Posts: 9
Joined: Wed May 26, 2004 4:42 pm

Click brings up submenu

Post by edweill »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Ed, I don't see our menu system at that URL.

As for the click open, see openonclick= and closeonclick= at http://milonic.com/itemproperties.php.
John
edweill
Beginner
Beginner
Posts: 9
Joined: Wed May 26, 2004 4:42 pm

Click brings up submenu

Post by edweill »

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.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Put the openonclick=1; in your MainMenuStyle.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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: Select all

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: Select all

retainClickValue=1;
_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
edweill
Beginner
Beginner
Posts: 9
Joined: Wed May 26, 2004 4:42 pm

Thanks

Post by edweill »

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
User avatar
Maestro
Super Advanced
Super Advanced
Posts: 45
Joined: Fri Dec 24, 2004 12:48 am
Location: Fort Bragg, CA
Contact:

Safari Browser and openonclick

Post by Maestro »

I followed the suggestions given above..
..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.
.. it worked; but not in Safari!

Is there a fix?
User avatar
Maestro
Super Advanced
Super Advanced
Posts: 45
Joined: Fri Dec 24, 2004 12:48 am
Location: Fort Bragg, CA
Contact:

Now it suddenly does work in Safari!

Post by Maestro »

Strange..
Now it suddenly works :oops:

Never mind.
Post Reply