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:12

sub-menus problem


Poster: bator
Dated: Tuesday September 16 2003 - 18:59:57 BST

Hi!
I'm trying to build a menu with the sub-menus on the left side of the main menu. I changed the offset to be 300 and now all the sun-menus are in the left side - but the right catagory's sub-menu is on the right side instead.
I know I'm being a bit unclear so I'm attaching my script.
Thank you!!!!!!


//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 http://www.milonic.co.uk/menu/filters_sample.php for more filters
if(navigator.appVersion.indexOf("MSIE 6.0")>0)
{
effect = "Fade(duration=0.2);Alpha(style=0,opacity=95);Shadow(color='#777777', Direction=135, Strength=5)"
}
else
{
effect = "Shadow(color='#777777', Direction=135, Strength=5)" // 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=40 // Follow Scrolling Rate
suboffset_top=10; // Sub menu offset Top position
suboffset_left=280; // Sub menu offset Left position

style1=[ // 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.
"white", // Mouse Off Font Color
"80736D", // Mouse Off Background Color
"white", // Mouse On Font Color
"80736D", // Mouse On Background Color
"000000", // Menu Border Color
14, // Font Size in pixels
"normal", // Font Style (italic or normal)
"bold", // Font Weight (bold or normal)
"Arial", // Font Name
4, // Menu Item Padding
"arrow.gif", // Sub Menu Image (Leave this blank if not needed)
, // 3D Border & Separator bar
"66ffff", // 3D High Color
"000099", // 3D Low Color
"Purple", // Current Page Item Font Color (leave this blank to disable)
"pink", // Current Page Item Background Color (leave this blank to disable)
"", // Top Bar image (Leave this blank to disable)
"ffffff", // Menu Header Font Color (Leave blank if headers are not needed)
"000099", // Menu Header Background Color (Leave blank if headers are not needed)
]

stylecoffee=["white","3D79F9","3D79F9","white","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]
stylerest=["white","73A0FF","73A0FF","white","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]
stylebar=["white","ADC6FD","black","ADC6FD","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]
styledelivery=["black","FDF6AD","white","FDF6AD","000000",12,"normal","bold","Arial",4,"arrow.gif",,"66ffff","000099","Purple","pink","", "ffffff","000099",]
stylehotel=["white","F2C752","F2C752","white","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]
stylecontact=["white","FFBA00","FFBA00","white","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]



addmenu(menu=[ // This is the array that contains your menu properties and details
"mainmenu", // Menu Name - This is needed in order for the menu to be called
20, // Menu Top - The Top position of the menu in pixels
0, // Menu Left - The Left position of the menu in pixels
150, // Menu Width - Menus width in pixels
1, // Menu Border Width
"center", // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
style1, // 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
0, // 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)
, // 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)
1, // 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)
, // Reserved for future use
, // Reserved for future use
, // Reserved for future use
,"רשק רוצ","show-menu=contact",,"",1 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"תונולמ","show-menu=hotels",,"",1
,"םיחולשמ","show-menu=delivery",,"",1
,"םיבאפו םיראב","show-menu=bar",,"",1
,"תודעסמ","show-menu=rest",,"",1
,"הפק יתב","show-menu=coffee",,"",1
])

addmenu(menu=["coffee",
,,150,1,"",stylecoffee,,"right",effect,,,,,,1,,,,,,
,"םוקימ יפל","show-menu=sub-coffee-location",,,1
,"גוס יפל","show-menu=sub-coffee-cat",,,1
])


addmenu(menu=["sub-coffee-location",
,,140,1,"",stylecoffee,,"right",effect,,,,,,1,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-coffee-cat",
,,140,1,"",stylecoffee,,"right",effect,,,,,,,,,,,,
,"ימצע תוריש","http://www.cnn.com",,,1
,"תותשר","http://www.news.com",,,1
,"םיימיטניא","http://www.wired.com",,,1
,"רב-הפק","http://www.slashdot.com",,,1
])

addmenu(menu=["rest",
,,150,1,"",stylerest,,"right",effect,,,,,,,,,,,,
,"םוקימ יפל","show-menu=sub-rest-location",,,1
,"גוס יפל","show-menu=sub-rest-cat",,,1
])


addmenu(menu=["sub-rest-location",
,,140,1,"",stylerest,,"right",effect,,,,,,,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-rest-cat",
,,140,1,"",stylerest,,"right",effect,,,,,,,,,,,,
,"ימצע תוריש","http://www.cnn.com",,,1
,"תותשר","http://www.news.com",,,1
,"םיימיטניא","http://www.wired.com",,,1
,"רב-הפק","http://www.slashdot.com",,,1
])


addmenu(menu=["bar",
,,150,1,"",stylebar,,"right",effect,,,,,,,,,,,,
,"םוקימ יפל","show-menu=sub-bar-location",,,1
,"גוס יפל","show-menu=sub-bar-cat",,,1
])


addmenu(menu=["sub-bar-location",
,,140,1,"",stylebar,,"right",effect,,,,,,,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-bar-cat",
,,140,1,"",stylebar,,"right",effect,,,,,,,,,,,,
,"ימצע תוריש","http://www.cnn.com",,,1
,"תותשר","http://www.news.com",,,1
,"םיימיטניא","http://www.wired.com",,,1
,"רב-הפק","http://www.slashdot.com",,,1
])

addmenu(menu=["delivery",
,,150,1,"",styledelivery,,"right",effect,,,,,,,,,,,,
,"הקולח רוזיא יפל","show-menu=sub-delivery-location",,,1
,"גוס יפל","show-menu=sub-delivery-cat",,,1
])


addmenu(menu=["sub-delivery-location",
,,140,1,"",styledelivery,,"right",effect,,,,,,,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-delivery-cat",
,,140,1,"",styledelivery,,"right",effect,,,,,,,,,,,,
,"ימצע תוריש","http://www.cnn.com",,,1
,"תותשר","http://www.news.com",,,1
,"םיימיטניא","http://www.wired.com",,,1
,"רב-הפק","http://www.slashdot.com",,,1
])

addmenu(menu=["hotels",
,,150,1,"",stylehotel,,"right",effect,,,,,,,,,,,,
,"הקולח רוזיא יפל","show-menu=sub-hotel-location",,,1
,"גוס יפל","show-menu=sub-hotel-cat",,,1
])


addmenu(menu=["sub-hotel-location",
,,140,1,"",stylehotel,,"right",effect,,,,,,,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-hotel-cat",
,,140,1,"",stylehotel,,"right",effect,,,,,,,,,,,,
,"החראה יתבו תוינסכא","http://www.cnn.com",,,1
,"םיבכוכ השולש דע","http://www.news.com",,,1
,"םיבכוכ העברא","http://www.wired.com",,,1
,"םיבכוכ השימח","http://www.slashdot.com",,,1
])



addmenu(menu=["contact",
,,140,1,"",stylecontact,,"center",effect,,,,,,,,,,,,
,"ונחנא ימ", "http://www.google.com",,,1
,"קסע לעב", "http://www.yahoo.com",,,1
,"רשק תריציל םיטרפ", "http://altavista.com",,,1
,"רשק תריציל ספוט", "http://www.excite.com",,,1
])

dumpmenus()


Poster: Hergio
Dated: Tuesday September 16 2003 - 20:07:51 BST

You have the "right to left" bit set for only some of your menus (the first 3 actually) ...set it for all of them and see if that fixes it.

still no good


Poster: bator
Dated: Tuesday September 16 2003 - 21:13:38 BST

I changed it and still no good - now the first menu from the right appears in the right place (to the left) , but all the rest sub-menus appear to the right
I attach the code again.
Thanks!!!!!

/*
DHTML Menu version 3.3.19
Written by Andy Woolley
Copyright 2002 (c) Milonic Solutions. All Rights Reserved.
Plase vist http://www.milonic.co.uk/menu or e-mail menu3 __at__ milonic.com
You may use this menu on your web site free of charge as long as you place prominent links to http://www.milonic.co.uk/menu and
your inform us of your intentions with your URL AND ALL copyright notices remain in place in all files including your home page
Comercial support contracts are available on request if you cannot comply with the above rules.
This script featured on Dynamic Drive (http://www.dynamicdrive.com)
*/

//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 http://www.milonic.co.uk/menu/filters_sample.php for more filters
if(navigator.appVersion.indexOf("MSIE 6.0")>0)
{
effect = "Fade(duration=0.2);Alpha(style=0,opacity=95);Shadow(color='#777777', Direction=135, Strength=5)"
}
else
{
effect = "Shadow(color='#777777', Direction=135, Strength=5)" // 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=40 // Follow Scrolling Rate
suboffset_top=10; // Sub menu offset Top position
suboffset_left=10; // Sub menu offset Left position

style1=[ // 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.
"white", // Mouse Off Font Color
"80736D", // Mouse Off Background Color
"white", // Mouse On Font Color
"80736D", // Mouse On Background Color
"000000", // Menu Border Color
14, // Font Size in pixels
"normal", // Font Style (italic or normal)
"bold", // Font Weight (bold or normal)
"Arial", // Font Name
4, // Menu Item Padding
"arrow.gif", // Sub Menu Image (Leave this blank if not needed)
, // 3D Border & Separator bar
"66ffff", // 3D High Color
"000099", // 3D Low Color
"Purple", // Current Page Item Font Color (leave this blank to disable)
"pink", // Current Page Item Background Color (leave this blank to disable)
"", // Top Bar image (Leave this blank to disable)
"ffffff", // Menu Header Font Color (Leave blank if headers are not needed)
"000099", // Menu Header Background Color (Leave blank if headers are not needed)
]

stylecoffee=["white","3D79F9","3D79F9","white","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]
stylerest=["white","73A0FF","73A0FF","white","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]
stylebar=["white","ADC6FD","black","ADC6FD","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]
styledelivery=["black","FDF6AD","white","FDF6AD","000000",12,"normal","bold","Arial",4,"arrow.gif",,"66ffff","000099","Purple","pink","", "ffffff","000099",]
stylehotel=["white","F2C752","F2C752","white","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]
stylecontact=["white","FFBA00","FFBA00","white","000000",12,"normal","bold", "Arial",4, "arrow.gif",,"66ffff", "000099","Purple", "pink","", "ffffff","000099",]



addmenu(menu=[ // This is the array that contains your menu properties and details
"mainmenu", // Menu Name - This is needed in order for the menu to be called
20, // Menu Top - The Top position of the menu in pixels
0, // Menu Left - The Left position of the menu in pixels
150, // Menu Width - Menus width in pixels
1, // Menu Border Width
"center", // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
style1, // 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
0, // 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)
, // 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)
1, // 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)
, // Reserved for future use
, // Reserved for future use
, // Reserved for future use
,"רשק רוצ","show-menu=contact",,"",1 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"תונולמ","show-menu=hotels",,"",1
,"םיחולשמ","show-menu=delivery",,"",1
,"םיבאפו םיראב","show-menu=bar",,"",1
,"תודעסמ","show-menu=rest",,"",1
,"הפק יתב","show-menu=coffee",,"",1
])

addmenu(menu=["coffee",
,,150,1,"",stylecoffee,,"right",effect,,,,,,1,,,,,,
,"םוקימ יפל","show-menu=sub-coffee-location",,,1
,"גוס יפל","show-menu=sub-coffee-cat",,,1
])


addmenu(menu=["sub-coffee-location",
,,140,1,"",stylecoffee,,"right",effect,,,,,,1,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-coffee-cat",
,,140,1,"",stylecoffee,,"right",effect,,,,,,1,,,,,,
,"ימצע תוריש","http://www.cnn.com",,,1
,"תותשר","http://www.news.com",,,1
,"םיימיטניא","http://www.wired.com",,,1
,"רב-הפק","http://www.slashdot.com",,,1
])

addmenu(menu=["rest",
,,150,1,"",stylerest,,"right",effect,,,,,,1,,,,,,
,"םוקימ יפל","show-menu=sub-rest-location",,,1
,"גוס יפל","show-menu=sub-rest-cat",,,1
])


addmenu(menu=["sub-rest-location",
,,140,1,"",stylerest,,"right",effect,,,,,,1,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-rest-cat",
,,140,1,"",stylerest,,"right",effect,,,,,,1,,,,,,
,"ימצע תוריש","http://www.cnn.com",,,1
,"תותשר","http://www.news.com",,,1
,"םיימיטניא","http://www.wired.com",,,1
,"רב-הפק","http://www.slashdot.com",,,1
])


addmenu(menu=["bar",
,,150,1,"",stylebar,,"right",effect,,,,,,1,,,,,,
,"םוקימ יפל","show-menu=sub-bar-location",,,1
,"גוס יפל","show-menu=sub-bar-cat",,,1
])


addmenu(menu=["sub-bar-location",
,,140,1,"",stylebar,,"right",effect,,,,,,1,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-bar-cat",
,,140,1,"",stylebar,,"right",effect,,,,,,1,,,,,,
,"ימצע תוריש","http://www.cnn.com",,,1
,"תותשר","http://www.news.com",,,1
,"םיימיטניא","http://www.wired.com",,,1
,"רב-הפק","http://www.slashdot.com",,,1
])

addmenu(menu=["delivery",
,,150,1,"",styledelivery,,"right",effect,,,,,,1,,,,,,
,"הקולח רוזיא יפל","show-menu=sub-delivery-location",,,1
,"גוס יפל","show-menu=sub-delivery-cat",,,1
])


addmenu(menu=["sub-delivery-location",
,,140,1,"",styledelivery,,"right",effect,,,,,,1,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-delivery-cat",
,,140,1,"",styledelivery,,"right",effect,,,,,,1,,,,,,
,"ימצע תוריש","http://www.cnn.com",,,1
,"תותשר","http://www.news.com",,,1
,"םיימיטניא","http://www.wired.com",,,1
,"רב-הפק","http://www.slashdot.com",,,1
])

addmenu(menu=["hotels",
,,150,1,"",stylehotel,,"right",effect,,,,,,1,,,,,,
,"הקולח רוזיא יפל","show-menu=sub-hotel-location",,,1
,"גוס יפל","show-menu=sub-hotel-cat",,,1
])


addmenu(menu=["sub-hotel-location",
,,140,1,"",stylehotel,,"right",effect,,,,,,1,,,,,,
,"ביבא לת ןופצ","http://www.cnn.com",,,1
,"ביבא לת זכרמ","http://www.msnbc.com",,,1
,"ביבא לת םורד","http://www.abcnews.com",,,1
])


addmenu(menu=["sub-hotel-cat",
,,140,1,"",stylehotel,,"right",effect,,,,,,1,,,,,,
,"החראה יתבו תוינסכא","http://www.cnn.com",,,1
,"םיבכוכ השולש דע","http://www.news.com",,,1
,"םיבכוכ העברא","http://www.wired.com",,,1
,"םיבכוכ השימח","http://www.slashdot.com",,,1
])



addmenu(menu=["contact",
,,140,1,"",stylecontact,,"center",effect,,,,,,1,,,,,,
,"ונחנא ימ", "http://www.google.com",,,1
,"קסע לעב", "http://www.yahoo.com",,,1
,"רשק תריציל םיטרפ", "http://altavista.com",,,1
,"רשק תריציל ספוט", "http://www.excite.com",,,1
])

dumpmenus()