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

Multiple Menus on one page??


Poster: webmonkey8
Dated: Monday October 6 2003 - 3:46:36 BST

Hello, in your FAQ, I read that it is possible to implement more than one master menu on a page, either vertically and horizontally. Now, what is the best way of doing this? How do I go about doing this? Do I have to rename 'menu_data.js' to 'menu_data.js_02' and 'menu_data.js_03' and so on? Then call these files individually on a page? I don't want to get copies of these menus conflicting each other.

Re: Multiple Menus on one page??


Poster: John
Dated: Monday October 6 2003 - 5:32:44 BST

webmonkey8 wrote:
Do I have to rename 'menu_data.js' to 'menu_data.js_02' and 'menu_data.js_03' and so on?

Having multiple menu_data files is fine, but not the way you have named them here. Doing that means they are no longer Javascript files as far as the system is concerned. You've taken away the .js suffix.

However, you could do something like menu_data01.js, menu_data02.js, etc. Actually the name can be anything you like (top_menu.js, side_menu.js), just as long as you don't mess with the .js at the end.

Whatever you use for a name, don't forget to change the call to match it.


Poster: kevin3442
Dated: Monday October 6 2003 - 7:21:38 BST

Another approach would be to simply define all menus in one .js file (menu_data.js). I find that a rule of thumb that works for me is: use separate files if some of the main menus will be on some pages but not on others. Use one file if all of your main menus will always be on all pages; using one file in this case is easier, in my opinion, to maintain.

The key is this... there really are no "main menus" and "submenus." There are only menus. Any menu has the potential to be a "main menu". Any menu also has the potential to be a "sub menu" in that any menu can be opened from an item in any other menu. So what distinguishes between a main menu and a submenu? It's really all about the site user's perspective. A "main menu" is one that is already open when the page loads, and remains available to the user for as long as that page is loaded into the browser. A sub menu is one that is not already open when the page loads, but pops up from a different menu (or other trigger onject).

In the menu code, here's what that means: If you set a menu's alwaysvisible property to 1, and set its Top and Left location on the page, then that menu will be open when the page loads and will always be available to the user; hence, it is a "main menu". If a menu's alwaysvisible property is not enabled, then that menu will not be open when the page loads and will presumambly only be opened from another menu (or other trigger on the page); hence, it is a "submenu". You can have as many alwaysvisible menus on a page as you want... i.e., as many main menus on a page as you want. And they can all be defined in one file.

Hope that helps,

Kevin

tried renaming but won't work


Poster: webmonkey8
Dated: Monday October 6 2003 - 20:54:48 BST

Hello, I tried renaming the js. files to get more than one master menu on one page. A bizzare thing happens. My new master menu appears, my previous menu is gone, however, the new menu has my old menu's sub menus. :!: What's going on here? How can I fix this?

Can someone give me an example of how to implement more than one master menu on one page? I'd appreciate it!
By the way, my old menu is version 3.3.19 Menu3 and I want to put an additional menu using the Multiple Styles menu on the same page.


Poster: John
Dated: Monday October 6 2003 - 21:39:16 BST

Are you saying you're using 3.3.19 now :?:

Post a URL (as requested) so we can see what's going on.