Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:54

openonclick once, then all menus open on mouseover?


Poster: jgiven
Dated: Thursday February 3 2005 - 20:01:59 GMT

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.


Poster: Andy
Dated: Thursday February 3 2005 - 20:12:19 GMT

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


Poster: kevin3442
Dated: Thursday February 3 2005 - 20:31:12 GMT

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

Thanks!


Poster: jgiven
Dated: Thursday February 3 2005 - 21:36:25 GMT

You guys rock!

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

Again Thanks.

J.P.

Same problem, but not working


Poster: eragon
Dated: Sunday November 20 2005 - 7:57:00 GMT

I've implemented the same value as described here:

Code:
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.


Poster: Ruth
Dated: Sunday November 20 2005 - 14:41:57 GMT

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:
aI("text=Categories;showmenu=Categories;align=center;itemwidth=80;status=Categories;openonclick=1;");


Ruth


Poster: eragon
Dated: Sunday November 20 2005 - 14:50:06 GMT

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

Thanks!