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

Frames version - not dealing with 'disabled' items


Poster: gmd
Dated: Monday September 25 2006 - 9:52:54 BST

I am starting to use the frames version. I have set one of the main menu items to type=disabled. This item has a sub-menu but the sub-menu (which appears in the other frame) is still active. What do I need to do please to make this happen. When a user logs in, I intend to enable the main-menu item- and hopefully the sub_menu(s).


Poster: kevin3442
Dated: Monday September 25 2006 - 16:58:27 BST

The root of the issue is that the frame system does not check to see if a menu item is disabled or not, it just opens the submenu. This can be fixed.

Two approaches:

(1) A change to the openSubmenu() function in mm_naveframe.js, to check to see if a menu item is disabled before opening the associated submenu.

(2) A wrapper function of your own design for the openSubmenu() function. You'd call your function from the main menu item's clickfunction property, instead of calling openSubmenu(). I.e., instead of calling openSubmenu() directly, you'd call a custom function that would first test to see if the menu item was disabled and, if not, call openSubmenu().

#1 would be preferred, because it would be a general solution for anyone who may have the same issue. #2 is easier, because the code would be under your control. You could try #2 now. Meantime, I'll see what I can do about #1.

Cheers,

Kevin


Poster: gmd
Dated: Tuesday September 26 2006 - 9:36:31 BST

thanks Kevin. I must admit that I don't understand your second point, not being a programmer so I guess that I will have to wait. Alternatively, I could use some php code on every page opened in the frame to check whether a user has logged on and then alter the state of the menus but I didn't want to do that.

Is this a similar problem to using mm_changeItemProperty on one page but after navigating away from it the menu item reverts to its original state?