Multiple Menus On The Same Page

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
liwebsolutions
Advanced
Advanced
Posts: 13
Joined: Wed Aug 07, 2002 2:56 pm

Multiple Menus On The Same Page

Post by liwebsolutions »

I tried putting two menus (disciplines and resources and each with a unique menuname) in one page. Only disciplines menu was enabled. I verified this by moving resources in front of disciplines and only resources was enabled. Can multiple menus appear on one page? I actually want four but tested two and got stuck. Any help will save me what hair I have left. Thanks.


<SCRIPT language=JavaScript src="disciplines_menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="resources_menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="../mmenu.js" type=text/javascript></SCRIPT>
liwebsolutions
Advanced
Advanced
Posts: 13
Joined: Wed Aug 07, 2002 2:56 pm

Post by liwebsolutions »

I found an Andy reply to a similiar question. His answer was set 'always visible' to 1. It was set to 1 during my failed test. I was also binding the menus to separate cells which Andy frowned on. Does this mean I am out of luck?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Did you pull that setup line from the second array?

Code: Select all

//The following line is critical for menu operation, and MUST APPEAR ONLY ONCE. If you have more than one menu_array.js file rem out this line in subsequent files
menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<script language=javascript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/script>";_d.write(mt)}
//Please leave the above line intact. The above also needs to be enabled if it not already enabled unless this file is part of a multi pack.
Should work...
John
liwebsolutions
Advanced
Advanced
Posts: 13
Joined: Wed Aug 07, 2002 2:56 pm

Post by liwebsolutions »

Thanks John.....yes I did find the answer nestled in this forum (the same one you provided) and it worked just fine...and I am binding 4 menus to 4 cells...thanks dick
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

I have also found that you can have multiple separate menus by defining them in the same array.js file. Define each separate menu using the addmenu function, as usual, and use Menu Top and Menu Left to place them. These menus exist independently, with no "show-menu" reference to them from any other menu. This has worked for me with two menus; haven't tried more than that.

Kevin
Post Reply