Two menus on one 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
Flash_harry
Advanced
Advanced
Posts: 11
Joined: Wed Apr 23, 2003 4:30 pm

Two menus on one page

Post by Flash_harry »

Hello there,

I need to have two sepertae menus on one page as the milonic pagehttp://www.milonic.co.uk/menu/

Here there is the horizontalmenu plus the foating menu at the side.

I downloaded both Zips but when I put in the two menus only one works, what extra thing do I need to do to make this work?

I have this in my body tags

<SCRIPT language=JavaScript src="menu_array.js" type=text/javascript></SCRIPT>
<script language=JavaScript src="menu_array2.js" type=text/javascript></script>
<SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT>

Any help is great

Cheers
Flash_harry
Advanced
Advanced
Posts: 11
Joined: Wed Apr 23, 2003 4:30 pm

Found the problem

Post by Flash_harry »

Ok I found the problem.

You must only have one set of this line

//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="<scr"+"ipt language=javascript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/scr"+"ipt>";_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.


You can load any number of menus but delete the above from any additional ones. Just have it in the first loaded.

Cheers

Flash
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Flash,

Just a note: You can also define both main menus in the same menu_array.js file.

Kevin
Post Reply