Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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: Saturday July 14 2012 - 06:07:24

Two menu_array.js


Poster: chrissi
Dated: Friday July 18 2003 - 18:02:15 BST

Hi friends,

are there possibilities of having TWO menu_array.js, but just ONE mmenu.js . What shall I delte, insert into the mmenu.js/menu_array.js

Thanks,

Chrissi



PS: Sorry for my English, but i'm german...


Poster: John
Dated: Saturday July 19 2003 - 19:18:23 BST

Yes, very easily. Just name your second array file something different, like menu_array2.js, or whatever.

As for what to delete, note the following at the top of the array file...
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="<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.

As it says, remove that code (or rem it out with //) from ALL array files except the first one you call.

For instance, if you have the array files...

menu_array.js
menu_array2.js

...leave the code in place in menu_array.js, but remove it from menu_array2.js.