Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:21
Multiple Menus On The Same Page
Poster: liwebsolutions
Dated: Wednesday October 9 2002 - 23:58:19 BST
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>
Poster: liwebsolutions
Dated: Thursday October 10 2002 - 0:10:12 BST
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?
Poster: John
Dated: Thursday October 10 2002 - 14:39:31 BST
Did you pull that setup line from the second array?
Code:
//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.
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...
Poster: liwebsolutions
Dated: Friday October 11 2002 - 17:47:54 BST
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
Poster: kevin3442
Dated: Tuesday October 15 2002 - 23:24:16 BST
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