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: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:05

Multiple Menus on Same Page


Poster: TeeLight
Dated: Tuesday May 16 2006 - 20:41:49 BST

I need to include horizontal and vertical menus on the same page. The Horizontal menu is maintained by a different department. So I copied menu_data.js and renamed it menu_data_2.js. The horizontal menu shows up but I can't position it where I'd like it to show up or change any of the colors.

I read the other posts but don't know enough about programming to connect all the dots. Thank you for your assistance.

[code]

with(menuStyle2=new mm_style()){
onbgcolor="#939300";
oncolor="#ffffff";
offbgcolor="#ffffff";
offcolor="#000000";
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=1;
separatorcolor="#ffffff";
separatorsize="0";
padding=4;
fontsize="8pt";
fontstyle="normal";
fontfamily="Arial, Verdana, Tahoma";
pagecolor="#000000";
pagebgcolor="#ffffff";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="http://www.chaffey.edu/main_images/arrow.gif";
subimagepadding="1";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}


with(menuStyle2=new mm_style()){
onbgcolor="#939300";
oncolor="#ffffff";
offbgcolor="#cccccc";
offcolor="#000000";
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=1;
separatorcolor="#ffffff";
separatorsize="1";
padding=4;
fontsize="8pt";
fontstyle="normal";
fontfamily="Arial, Verdana, Tahoma";
pagecolor="#990000";
pagebgcolor="#cccccc";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="http://www.chaffey.edu/main_images/arrow.gif";
subimagepadding="1";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}


with(milonic=new menuname("Main Menu")){
style=menuStyle2;
top=200;
left=10;
alwaysvisible=1;
orientation="vertical";
aI("text=General;showmenu=general;url=http://www.chaffey.edu/geninfo.shtml;status=General Information Directory;");
aI("text=Students;showmenu=students;url=http://www.chaffey.edu/stures.shtml;");
aI("text=Instruction;showmenu=instruction;url=http://www.chaffey.edu/instpgms.shtml;");
aI("text=Campus Life;showmenu=campus;url=http://www.chaffey.edu/camplife.shtml;");
aI("text=Community;showmenu=community;url=http://www.chaffey.edu/community.shtml;");
aI("text=ChaffeyVIEW;url=http://www.chaffey.edu/chaffeyview/index.shtml;");
}

with(milonic=new menuname("general")){
style=menuStyle2;
aI("text=Contact Us!;url=http://www.chaffey.edu/ccfeedback.shtml;");
aI("text=District Information;showmenu=district;url=http://www.chaffey.edu/ccdist.shtml;");
aI("text=Employment;url=http://www.chaffey.edu/humres/index.shtml;");
aI("text=Governing Board;url=http://www.chaffey.edu/governingboard/index.shtml;");
aI("text=News and Announcements;showmenu=news;");
aI("text=Welcome from the President;url=http://www.chaffey.edu/president.shtml;");
aI("text=More...;url=http://www.chaffey.edu/geninfo.shtml;");
}

with(milonic=new menuname("district")){
style=menuStyle2;
aI("text=Academic Calendar;url=http://www.chaffey.edu/acacal.shtml;");
aI("text=History of the college;url=http://www.chaffey.edu/cchist.shtml;");
aI("text=Maps;url=http://www.chaffey.edu/ccmaps/index.shtml;");
aI("text=Mission Statement;url=http://www.chaffey.edu/ccmission.shtml;");
aI("text=Policies;showmenu=policies;");
aI("text=Staff Directory;url=http://www2.chaffey.edu/contacts/index.php;");
}
[/code][/code]


Poster: Andy
Dated: Thursday May 18 2006 - 17:00:56 BST

You should be able to copy the files and declare them twice.

However, you must ensure that the menu names are all unique, most noticable menu is the main one named "Main Menu" - you will need to rename this menu and set its position in order to see it

Hope this helps,
Andy


Poster: TeeLight
Dated: Friday May 19 2006 - 1:04:53 BST

It helps somewhat. Could you break it down in smaller steps for me.

The code I pasted in my earlier e-mail is actually my copy of the original menu_data.js file. I called this one menu_data_2.js.

How do I declare each menu and where would I include it. Would both declarations go in the menu_data.js and menu_data_2.js files. Or would they go on the web page. Is this an example of a declaration for the web page:
code]<SCRIPT language=JavaScript src="menu_data_new.js" type=text/javascript></SCRIPT>[[/code]

Thank you. I appreciate your help.


Poster: Andy
Dated: Saturday May 20 2006 - 11:55:28 BST

Here is some code with 2 main menus, both menus call the same sub menus but are in effect different menus.

Code:
fixMozillaZIndex=true;
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;


with(menuStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#eeeeee";
offcolor="#000000";
onbgcolor="#ddffdd";
oncolor="#000099";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=4;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#999999";
separatorsize=1;
subimage="arrow.gif";
subimagepadding=2;
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
left=10;
orientation="horizontal";
style=menuStyle;
top=10;
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Samples;text=Menu Samples;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=MyMilonic;text=My Milonic;");
}


with(milonic=new menuname("Main Menu2")){
alwaysvisible=1;
left=100;
orientation="horizontal";
style=menuStyle;
top=100;
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Samples;text=Menu Samples;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=MyMilonic;text=My Milonic;");
}



with(milonic=new menuname("Samples")){
overflow="scroll";
style=menuStyle;
aI("text=Plain Text Horizontal Style DHTML Menu Bar;url=http://www.milonic.com/menusample1.php;")
aI("text=Vertical Plain Text Menu;url=http://www.milonic.com/menusample2.php;")
aI("text=All Horizontal Menus;url=http://www.milonic.com/menusample25.php;")
aI("text=Using The Popup Menu Function Positioned by Images;url=http://www.milonic.com/menusample24.php;")
aI("text=Classic XP Style Menu;url=http://www.milonic.com/menusample82.php;")
aI("text=XP Style;url=http://www.milonic.com/menusample86.php;")
aI("text=XP Taskbar Style Menu;url=http://www.milonic.com/menusample83.php;")
aI("text=Office XP Style Menu;url=http://www.milonic.com/menusample47.php;")
aI("text=Office 2003 Style Menu;url=http://www.milonic.com/menusample46.php;")
aI("text=Apple Mac Style Menu;url=http://www.milonic.com/menusample72.php;")
aI("text=Amazon Style Tab Menu;url=http://www.milonic.com/menusample74.php;")
aI("text=Milonic Home Menu;url=http://www.milonic.com/menusample78.php;")
aI("text=Windows 98 Style Menu;url=http://www.milonic.com/menusample13.php;")
aI("text=Multiple Styles Menu;url=http://www.milonic.com/menusample5.php;")
aI("text=Multi Colored Menu Items;url=http://www.milonic.com/menusample80.php;")
aI("text=Multi Colored Menus Using Styles;url=http://www.milonic.com/menusample7.php;")
aI("text=Multi Tab;url=http://www.milonic.com/menusample50.php;")
aI("text=Tab Top;url=http://www.milonic.com/menusample52.php;")
aI("text=Multi Columns;url=http://www.milonic.com/menusample73.php;")
aI("text=100% Width Span Menu;url=http://www.milonic.com/menusample26.php;")
aI("text=Follow Scrolling Style Menu;url=http://www.milonic.com/menusample10.php;")
aI("text=Menu Positioning With Offsets;url=http://www.milonic.com/menusample23.php;")
aI("text=Table Based (Relative) Menus;url=http://www.milonic.com/menusample9.php;")
aI("text=Opening Windows and Frames with the Menu;url=http://www.milonic.com/menusample11.php;")
aI("text=Menus Over Form Selects, Flash and Java Applets;url=http://www.milonic.com/menusample14.php;")
aI("text=Activating Functions on Mouseover;url=http://www.milonic.com/menusample15.php;")
aI("text=Drag Drop Menus;url=http://www.milonic.com/menusample22.php;")
aI("text=Menus with Header Type Items;url=http://www.milonic.com/menusample8.php;")
aI("text=Right To Left Openstyle;url=http://www.milonic.com/menusample65.php;")
aI("text=Up Openstyle Featuring Headers;url=http://www.milonic.com/menusample33.php;")
aI("text=DHTML Menus and Tooltips;url=http://www.milonic.com/menusample6.php;")
aI("text=Unlimited Level Menus Example;url=http://www.milonic.com/menusample67.php;")
aI("text=Context Right Click Menu;url=http://www.milonic.com/menusample27.php;")
aI("text=Menus built entirely from images;url=http://www.milonic.com/menusample18.php;")
aI("text=Static Images Sample;url=http://www.milonic.com/menusample16.php;")
aI("text=Rollover Swap Images Sample;url=http://www.milonic.com/menusample17.php;")
aI("text=Background Item Images;url=http://www.milonic.com/menusample20.php;")
aI("text=Background Image Buttons;url=http://www.milonic.com/menusample89.php;")
aI("text=Menu Background Images;url=http://www.milonic.com/menusample76.php;")
aI("text=Creating Texture with Menu Background Images;url=http://www.milonic.com/menusample19.php;")
aI("text=Static Background Item Images;url=http://www.milonic.com/menusample71.php;")
aI("text=Vertical Static Background Item Images;url=http://www.milonic.com/menusample87.php;")
aI("text=World Map Sample;url=http://www.milonic.com/menusample92.php;")
aI("text=US Map Sample;url=http://www.milonic.com/menusample91.php;")
aI("text=Image Map Sample;url=http://www.milonic.com/menusample4.php;")
aI("text=Rounded Edges Imperial Style;url=http://www.milonic.com/menusample21.php;")
aI("text=Corporation;url=http://www.milonic.com/menusample40.php;")
aI("text=International;url=http://www.milonic.com/menusample70.php;")
aI("text=Clean;url=http://www.milonic.com/menusample32.php;")
aI("text=3D Gradient Block;url=http://www.milonic.com/menusample57.php;")
aI("text=Descreet;url=http://www.milonic.com/menusample42.php;")
aI("text=Agriculture;url=http://www.milonic.com/menusample41.php;")
aI("text=Breeze;url=http://www.milonic.com/menusample29.php;")
aI("text=Chart;url=http://www.milonic.com/menusample66.php;")
aI("text=Cartoon;url=http://www.milonic.com/menusample77.php;")
aI("text=Start Button Menu;url=http://www.milonic.com/menusample69.php;")
aI("text=Tramline;url=http://www.milonic.com/menusample54.php;")

}

with(milonic=new menuname("Milonic")){
style=menuStyle;
aI("text=Product Purchasing Page;url=http://www.milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
aI("text=FAQ;url=http://www.milonic.com/menufaq.php;");
aI("text=Discussion Forum;url=http://www.milonic.com/forum/;");
aI("text=Software License Agreement;url=http://www.milonic.com/license.php;");
aI("text=Privacy Policy;url=http://www.milonic.com/privacy.php;");
}

with(milonic=new menuname("Partners")){
style=menuStyle;
aI("status=(aq) Web Server Hosting & Services;text=(aq) Web Hosting;url=http://www.a-q.co.uk/;");
aI("text=WebSmith;url=http://www.softidiom.com/?milonicmenu;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
}

with(milonic=new menuname("Links")){
style=menuStyle;
aI("status=Apache Web Server, the basis of Milonic's Web Site;text=Apache Web Server;url=http://www.apache.org/;");
aI("status=MySQL, Milonic's Prefered Choice of Database Server;text=MySQL Database Server;url=http://ww.mysql.com/;");
aI("status=PHP - Web Server Scripting as used by Milonic;text=PHP - Development;url=http://www.php.net/;");
aI("status=PHP Based Web Forum, Milonic's Recommended Forum Software;text=phpBB Web Forum System;url=http://www.phpbb.net/;");
aI("showmenu=Anti Spam;status=Anti Spam Solutions, as used by Milonic;text=Anti Spam Tools;");
}

with(milonic=new menuname("Anti Spam")){
style=menuStyle;
aI("text=Spam Cop;url=http://www.spamcop.net/;");
aI("text=Mime Defang;url=http://www.mimedefang.org/;");
aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
}

with(milonic=new menuname("MyMilonic")){
style=menuStyle;
aI("text=Login;url=http://www.milonic.com/login.php;");
aI("text=Licenses;url=http://www.milonic.com/mylicenses.php;");
aI("text=Invoices;url=http://www.milonic.com/myinvoices.php;");
aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}

drawMenus();



Hope this helps,
Andy

Thank You Andy!!


Poster: TeeLight
Dated: Friday May 26 2006 - 0:12:26 BST

Thank you for helping me to use two menus on the same page. I struggled for a couple of days before asking for help. Thank you again!!