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: Wednesday July 18 2012 - 06:07:37

2 menu_array.js files possible?

Poster: pat __at__
Dated: Saturday May 25 2002 - 2:50:00 BST


I am trying to find a way to run two distinct menu_array.js files within my site and wonder if its possible. I do not wish to have two menus on one single page, as is the case with the Milonic home page, rather I want to run a completely different menu within a distinct part of my site. Is this possible and if so, how do I accomplish this?


Poster: yadin
Dated: Saturday May 25 2002 - 15:40:04 BST

I'm not sure of your exact problem the way it is stated here... If you want a different array to be used by different pages simply have menu_array2.js and call that file from the html instead of menu_array.js.
Hope this helps.

Poster: pat __at__
Dated: Saturday May 25 2002 - 19:50:09 BST

Thanks for the reply.

I have setup a second menu array file named .... secondmenu_array.js. This file is called from .

As per instructions, I have removed the line below in my secondmenu_array.js because it appears in my other menu_array.js

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)}

I have also named this menu within the addmenu properties "secondmenu".

Apart from not seeing the menu in the test.html, I get an error on line 65 - object expected.

I have copied below the entire secondmenu_array.js file for reference.

Any help you can provide would be appreciated :)


Milonic DHTML Website Navigation Menu - Version 3.4
Written by Andy Woolley - Copyright 2002 (c) Milonic Solutions Limited. All Rights Reserved.
Please visit or e-mail menu3 __at__ for more information.

The Free use of this menu is only available to Non-Profit, Educational & Personal web sites.
Commercial and Corporate licenses are available for use on all other web sites & Intranets.
All Copyright notices MUST remain in place at ALL times and, please keep us informed of your
intentions to use the menu and send us your URL.

//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.

// Editable properties START here //

// Special effect string for IE5.5 or above please visit for more filters
if(navigator.appVersion.indexOf("MSIE 6.0")>0)
effect = "gradientwipe(size=1.00, wipestyle=0, motion=Forward, duration=0.7)"
effect = "gradientwipe(size=1.00, wipestyle=0, motion=Forward, duration=0.7)" // Stop IE5.5 bug when using more than one filter

timegap=500 // The time delay for menus to remain visible
followspeed=5 // Follow Scrolling speed
followrate=20 // Follow Scrolling Rate
suboffset_top=6; // Sub menu offset Top position
suboffset_left=12; // Sub menu offset Left position

style2=[ // style1 is an array of properties. You can have as many property arrays as you need. This means that menus can have their own style.
"443f5c", // Mouse Off Font Color
"ffffcc", // Mouse Off Background Color
"ffffcc", // Mouse On Font Color
"443f5C", // Mouse On Background Color
"999999", // Menu Border Color
11, // Font Size
"normal", // Font Style
"normal", // Font Weight
"Verdana,Arial,Serif", // Font Name
3, // Menu Item Padding
"images/arrow.gif", // Sub Menu Image (Leave this blank if not needed)
0, // 3D Border & Separator bar
"66ffff", // 3D High Color
"000099", // 3D Low Color
, // Current Page Item Font Color (leave this blank to disable)
, // Current Page Item Background Color (leave this blank to disable)
"images/dwnarrow.gif", // Top Bar image (Leave this blank to disable)
, // Menu Header Font Color (Leave blank if headers are not needed)
, // Menu Header Background Color (Leave blank if headers are not needed)
"999999", // Menu Item Separator Color

addmenu(menu=[ // This is the array that contains your menu properties and details
"secondmenu", // Menu Name - This is needed in order for the menu to be called
300, // Menu Top - The Top position of the menu in pixels
55, // Menu Left - The Left position of the menu in pixels
, // Menu Width - Menus width in pixels
1, // Menu Border Width
, // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
style2, // Properties Array - this is set higher up, as above
1, // Always Visible - allows the menu item to be visible at all time (1=on/0=off)
"center", // Alignment - sets the menu elements text alignment, values valid here are: left, right or center
effect, // Filter - Text variable for setting transitional effects on menu activation - see above for more info
, // Follow Scrolling - Tells the menu item to follow the user down the screen (visible at all times) (1=on/0=off)
1, // Horizontal Menu - Tells the menu to become horizontal instead of top to bottom style (1=on/0=off)
, // Keep Alive - Keeps the menu visible until the user moves over another menu or clicks elsewhere on the page (1=on/0=off)
"right", // Position of TOP sub image left:center:right
, // Set the Overall Width of Horizontal Menu to 100% and height to the specified amount (Leave blank to disable)
, // Right To Left - Used in Hebrew for example. (1=on/0=off)
, // Open the Menus OnClick - leave blank for OnMouseover (1=on/0=off)
, // ID of the div you want to hide on MouseOver (useful for hiding form elements)
, // Background image for menu when BGColor set to transparent.
, // Scrollable Menu
, // Reserved for future use
,"Symbolist&nbsp;Show","",,,1 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"Prospectus '02","",,,1

,"lastname, first","",,,1

,"lastname, first","",,,1
// Editable properties END here //
dumpmenus() // This must be the last line in this file

Poster: yadin
Dated: Sunday May 26 2002 - 14:38:12 BST

The line you removed is critical for menu operation, you must restore it. The only reason to remove that line is if you call 2 array files from the SAME html page. You are calling these array files from DIFFERENT pages. Some people prefer to have 2 array files when they have 2 menus on one page, personally I just put more property and menu entries in the one array. You have 2 array files because different parts of your site are using different menus entirely, unless I misunderstood you.
Hope this clears it up.

Poster: pat __at__
Dated: Sunday May 26 2002 - 23:44:20 BST

Right on Yadin!! Thanks so much, it works like a charm :)