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.
Multiple Menus On The Same Page
-
- Beginner
- Posts: 1
- Joined: Sun May 19, 2002 7:24 pm
-
- Beginner
- Posts: 2
- Joined: Sun May 19, 2002 7:24 pm
Re: Multiple Menus On The Same Page
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
Where it says
//The following line is critical for menu operation,
-- Andy
-
- Beginner
- Posts: 1
- Joined: Sun May 19, 2002 7:24 pm
Re: Multiple Menus On The Same Page
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
Matt
-
- Beginner
- Posts: 1
- Joined: Sun May 19, 2002 7:24 pm
Re: Multiple Menus On The Same Page
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
/Herbert
-
- Beginner
- Posts: 2
- Joined: Sun May 19, 2002 7:23 pm
Re: Multiple Menus On The Same Page
<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.
<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.