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

:( The openonclick, Does not work


Poster: mledesma
Dated: Thursday December 18 2003 - 5:51:53 GMT

:( The openonclick, Does not work. I would like to know which is the right value for the attribute. I read your whole site and I could not find the value for that feature.


Poster: kevin3442
Dated: Thursday December 18 2003 - 23:26:27 GMT

I have used openonclick as a menu item property in main menu items, like so:
Code:
with(milonic=new menuname("mainmenu")){
style=mainStyle;
top=10;
left=10;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://www.penlink.com/;");
aI("text=Drop;showmenu=drop;openonclick=1;");
aI("text=Search;showmenu=search;openonclick=1;");
aI("text=News;showmenu=news;openonclick=1;");
}

Note that I've set openonclick=1; in the individual items that also have a showmenu. Therefore, the submenu that any of these items will open should open when the menu item is clicked.

As with many menu item properties, you can also use openonclick as a menu style property. For example, if you set
Code:
openonclick=1;

in the mainStyle, for the menu defined above, then you wouldn't need to define the property in each menu item.

Two other things:

(1) From my own testing, it seems that the openonclick property only works in menus that also have alwaysvisible=1 (i.e., "main" menus.) Otherwise, even if a menu uses a style where openonclick is enabled, if that menu is not alwaysvisible, then submenus branching from it will open on mouseover (kind of like a Windows menu structure).

(2) There is a global variable called retainClickValue that you can use to modify the openonclick behavior. If this variable is not defined, or if
Code:
retainClickValue=0;

then each menu item that is set to open a submenu with openonclick must be clicked to open the submenu. But if
Code:
retainClickValue=1;

then you can open the first submenu with a click on the calling item, but once a submenu is open, other submenus from the same "main" menu will open just by mousing over the calling 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.

If you want to use retainClickValue (I recommend it), then you should set it like so:
Code:
retainClickValue=1;

at the top of your menu_data.js file, where the other global values (like _menuCloseDelay=500;) are set.

Hope that helps,

Kevin


Poster: Maz
Dated: Friday December 19 2003 - 0:32:33 GMT

I have pointer=arrow
and tried retainClickValue=1; at the top,
I don't see either working.

now in Safari ... not sure of anything at this point.

maz