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:17
Menu's open on mouseover after openonclick is set
Poster: densy
Dated: Thursday August 21 2008 - 8:58:22 BST
I need to modify a menu so that a submenu is only opened when a user clicks on the First line menu. Submenu’s should not open on mouseover. When an option in the first line menu is clicked on, it should remain in an active state (meaning: the overimage should remain highlighted so that the user knows which option he/she has chosen. I added the openonclick option to the first line menu to see if this would achieve my goals
Code:
aI("image=fileadmin/huisstijlen/nav/basis.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/basis_over.jpg;showmenu=basis;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/huisstijl.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/huisstijl_over.jpg;showmenu=huisstijl;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/hetgezicht.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/hetgezicht_over.jpg;showmenu=hetgezicht;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/destem.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/destem_over.jpg;showmenu=destem;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/middelen.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/middelen_over.jpg;showmenu=demiddelen;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/down.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/down_over.jpg;showmenu=downloads;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/huisstijl.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/huisstijl_over.jpg;showmenu=huisstijl;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/hetgezicht.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/hetgezicht_over.jpg;showmenu=hetgezicht;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/destem.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/destem_over.jpg;showmenu=destem;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/middelen.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/middelen_over.jpg;showmenu=demiddelen;openonclick=1;");
aI("image=fileadmin/huisstijlen/nav/down.jpg;keepalive=1;overimage=fileadmin/huisstijlen/nav/down_over.jpg;showmenu=downloads;openonclick=1;");
The menu now opens when I click on it, but after that when I hover over the other First line menu options they immediately open. They should only open on click, but somehow they open immediately on hover when a user clicks one of the first line menu options. I have found no way to fix this behaviour.
The first line menu also does remain in an active state, after a while the image reverts back to the normal image.
Is what I am describing even possible, and if so how should this be done?
Re: Menu's open on mouseover after openonclick is set
Poster: Ruth
Dated: Sunday August 24 2008 - 5:03:26 BST
Hi,
I will need a test page with the complete data file on it so I can work on it.
Ruth
Re: Menu's open on mouseover after openonclick is set
Poster: densy
Dated: Wednesday August 27 2008 - 9:29:56 BST
Hi,
I have made the following page so you can see the problem I'm talking about
Example
Re: Menu's open on mouseover after openonclick is set
Poster: Ruth
Dated: Wednesday August 27 2008 - 18:08:56 BST
Hi,
Add closeonclick=1; to all the main menu items and then in the menu_data file up at the top area add retainClickValue=true; See if that doesn't make it act more in the way you want, if not try leaving the closeonclick=1; in the main menu items but remove the retainClickValue=true; from the data file
Ruth
Re: Menu's open on mouseover after openonclick is set
Poster: densy
Dated: Friday August 29 2008 - 11:55:45 BST
Hi,
I've tried the options you advised me to use, but i didn't notice any change in behavior. Is there anything else I could try?