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

Submenu should stay opened


Poster: flyceo
Dated: Thursday May 25 2006 - 17:47:43 BST

Hello everybody!

I want to create a completely horizontal menu. I mean the main menu and all submenus are horizontal. If the mouse is over an item of the main menu of course the submenu opens. But if the mouse is out of the menu the opened submenu should stay opened. It should only be closed when the mouse is over another main menu item. Then the submenus should be replaced by the submenu of the newly selected item.

I tried to use "keepalive" but this did not work. With "keepalive" the submenus did not disappear - they entitled themselves wich caused problems.

So please help me and give me a good solution for my problem!

Thank you very much!
Roland

P.S.: Here is the code I used in menu_data.js as a test

Code:
fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=0;
_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)';
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=;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;
orientation='horizontal';
left=10;
keepalive=1;
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;')
}

with(milonic=new menuname('Milonic')){
style=menuStyle;
orientation='horizontal';
left=10;
keepalive=1;
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;
orientation='horizontal';
left=10;
keepalive=1;
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;
orientation='horizontal';
left=10;
keepalive=1;
aI('status=Apache Web Server, the basis of Milonics Web Site;text=Apache Web Server;url=http://www.apache.org/;');
aI('status=MySQL, Milonics 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, Milonics 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;
orientation='horizontal';
left=10;
keepalive=1;
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;
orientation='horizontal';
left=10;
keepalive=1;
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();


Poster: Ruth
Dated: Sunday May 28 2006 - 6:48:19 BST

Hi,

Try placing the keepalive=1; into the main menu item that opens the submenu.

Ruth