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: Thursday February 8 2018 - 06:02:48

hide menu when page is match.

Poster: twing
Dated: Wednesday April 20 2005 - 7:23:31 BST

Hi there,

Is there a way to not pop up the sub menu when the page is match? Currently, the sub menu is displayed when mouse hover on it.

Here is the menu arrangement:

menu1 menu2
|-menu1a |-menu2b

If menu 1 a is selected, we will go to page1A... In page1A if mouse hover on menu1, we don't display the sub menu. If mouse hover on menu2, the sub menu2 is displayed.

Hope it's clear,


Poster: Ruth
Dated: Wednesday April 20 2005 - 15:23:15 BST

Hi Twing,

It could probably be done, but I think it would need to have a special javascript function to tell it when to show and not show the menu and I don't know how involved it would be. The person who might know is out of town this week. Perhaps when they return they could tell you if it is possible or not.


Poster: Ruth
Dated: Saturday May 7 2005 - 0:26:47 BST


I think there is a way to do this. Can you post your menu_data.js code? I need to have your data to set it up and see if it's feasible. There's a function called mm_changeItemProperty and I think that could be used to disable the item on particular pages which would prevent the submenu from opening.


Poster: twing
Dated: Monday May 9 2005 - 8:01:40 BST

I tried:
var menuNumber = getMenuByName(selectedMenu);

which didn't help. Couldn't find mm_changeItemProperty anywhere though. I'm using 5.721.

Poster: Ruth
Dated: Monday May 9 2005 - 16:57:29 BST

Sorry, I should have put in the link to the topic with that in it. :oops:


The only problem is, when I was trying to check this in browsers, it seems that in Netscape it still let's you click the item. The one I was testing was to disable the back that some people use, the javascript:history.back() but instead of disabling it, when you click it in netscape it goes to a page that says false. That was on a link, but I didn't get a chance to setup and try it with an item that just had showmenu.


Poster: kevin3442
Dated: Tuesday May 10 2005 - 0:24:12 BST

By way of example, suppose the name of the menu containing the item is "Main Menu" and the item we want to disable (so that it's normal drop-down doesn't show) is called "Products". You could disable the dropdown in a couple of ways using mm_changeItemProperty().

(1) You could set the item's type property (coderef = 34) to 'disabled'. Like so:

Code: Select all

mm_changeItemProperty('Main Menu', 'Products', 34, 'disabled', 1);

This will prevent the drop-down from appearing, but also alters the item's text so that it appears "grayed out" or disabled.

(2) You could set the item's showmenu property (coderef = 3) to null, like so:

Code: Select all

mm_changeItemProperty('Main Menu', 'Products', 3, null, 1);

This would change the item so that it doesn't have a drop-down menu anymore. This will also alter the item's appearance, removing the subimage if one has been defined (no submenu... no more subimage). If you pass a 0 instead of a 1 in the last parameter, like so:

Code: Select all

mm_changeItemProperty('Main Menu', 'Products', 3, null, 0);

then showmenu will be disabled, but the subimage will remain (because the menu was not redrawn)... note that if you run a function after that to cause the menu to redraw, then the subimage will disappear; but that shouldn't happen under normal menu use.

There are various other approaches if these two don't work for you.



item name

Poster: twing
Dated: Wednesday May 11 2005 - 6:32:27 BST

Hi Kev,

Thanks for the tips.

I modify the itemName parameter in mm_changeItemProperty() to look for showmenu item property (3), because the same value is also use in keypress.js script.

After that change here is what happen:
+ user select the last menu.
+ new page displayed with no pop up on last menu.
+ But the tab doesn't work anymore.

If other menu, beside the last one, is selected, the tabbing is ok.