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:46
Multiple Menus On The Same Page
Poster: dougd __at__ pshift.com
Dated: Wednesday January 30 2002 - 15:07:51 GMT
What is the correct code to use for placing multiple menus on the same page? I have tried:
</SCRIPT>
<SCRIPT language=JavaScript src="dyn_images_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="dyn_images_array_2.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT><script>
but the 2nd one is cancelling out the first for some reason. I know there is a simple answer but I have not found it.
Re: Multiple Menus On The Same Page
Poster: echobeatz666 __at__ aol.com
Dated: Saturday March 16 2002 - 20:33:02 GMT
You need to remove the code at the start of the second array.
Where it says
//The following line is critical for menu operation,
-- Andy
Re: Multiple Menus On The Same Page
Poster: akiwitz __at__ web.de
Dated: Sunday March 17 2002 - 1:15:31 GMT
Thanks Andy...I tried that and it does not cancel the first one out, yet I am still unable to call both menu's --It just calls the first one now.
Matt
Re: Multiple Menus On The Same Page
Poster: laria __at__ optusnet.com.au
Dated: Monday March 18 2002 - 1:36:03 GMT
I placed all menues in one js file. Do you have a reason (except better overview) to use 2 ? E.g. though I have 10 buttons looking like one menu with 10 items, they are actually 10 menues with one item, because I found no other way to have a broader than a 3-pixel item border which does not hide the button text. This solution worked fine.
/Herbert
Re: Multiple Menus On The Same Page
Poster: john __at__ revjon.com
Dated: Monday March 18 2002 - 13:32:13 GMT
<SCRIPT language=JavaScript src="dyn_images_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="dyn_images_array_2.js" type=text/javascript></SCRIPT>
The trick lies in arranging the above two menus.
For this, You dont cancel.
<SCRIPT language=JavaScript src="dyn_images_array.js" type=text/javascript></SCRIPT>
//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.
For this you have to cancel
<SCRIPT language=JavaScript src="dyn_images_array_2.js" type=text/javascript></SCRIPT>
//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)}
Should work fine.