openonclick once, then all menus open on mouseover?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jgiven
Beginner
Beginner
Posts: 2
Joined: Thu Feb 03, 2005 8:50 pm

openonclick once, then all menus open on mouseover?

Post by jgiven »

I was hoping to attempt to get the milonic menu to work more like the Windows menus (File>Edit>View>etc...) where you click on one once and then all open onMouseOver.

I have tried creating a custom function that is called when clicking an element in the main menu.

This does work...
XPMainStyle.openonclick = "false"; -> (set to true at first in the Milonic with(XPMainStyle=new mm_style()))

However even once switched the menu's still need to be clicked to open...

I am refrencing the variable correctly as I can alert its original state first and then again after I set it to false.

Any help would be greatly appreciated. Maybe someone has already found a work around for it.

Thanks again,
J.P.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Try adding retainClickValue=true; to your menu_data.js file.

This has changed for the next version of the menu, retainClickValue will bo on by default in the new menu.

Hope this helps
Andy
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

My 2 cents...

To expand on Andy's suggestion... The behavior you want is a built-in capability of the menu. You won't need to add any custom functionality.

Use retainClickValue (a global property) in conjunction with the openonclick property (either as a style property or an item property, depending on your preference).

See this post for more.

Cheers,

Kevin
jgiven
Beginner
Beginner
Posts: 2
Joined: Thu Feb 03, 2005 8:50 pm

Thanks!

Post by jgiven »

You guys rock!

That worked perfectly. I had a feeling there would be a global setting for that ability.

Again Thanks.

J.P.
eragon
Advanced
Advanced
Posts: 21
Joined: Sat Feb 26, 2005 6:29 am

Same problem, but not working

Post by eragon »

I've implemented the same value as described here:

Code: Select all

retainClickValue = true;
and put it at the very top of my menu_data.js. However, my menu is still opening on rollover. I even tried using the onclick value found in another thread and it still has no effect.

What am I missing?

My site is here: http://www.familywebwatch.com. I want the "Categories" link to open when a user click's on it and have the submenus open on rollover. If I understand correctly, this behavior should be solved by using the retainClickValue.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi Eragon,

You forgot to tell the 1st level submenu to open on click. The default, if you don't specify openonclick is to open on mouseover.

Code: Select all

aI("text=Categories;showmenu=Categories;align=center;itemwidth=80;status=Categories;openonclick=1;");
Ruth
eragon
Advanced
Advanced
Posts: 21
Joined: Sat Feb 26, 2005 6:29 am

Post by eragon »

Awesome Ruth! That did the trick. I didn't understand that both values were required. I just thought one or the other.

Thanks!
Post Reply