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

Keypress with multiple menus


Poster: rderoch
Dated: Tuesday June 6 2006 - 23:54:49 BST

I have two menus on my "production page". The code I've included is actually from my "test page" which has four menus on it currently. I have been playing with the tree and collapsible menus.
I finally got keypress to work on the page without errors, and it now finds the first menu item and tabs through the first menu on the page beautifully. Unfortunately, I can't figure out how to get off that menu and on to another one. Any help would be greatly appreciated.

<SCRIPT language=JavaScript src="/includes/milonic_src.js"></SCRIPT>
<SCRIPT language=JavaScript src="/includes/mmenudom.js"></SCRIPT>
<SCRIPT language=JavaScript src="/includes/treemenu.js"></SCRIPT>
<SCRIPT language=JavaScript src="/includes/keypress.js"></SCRIPT>
<SCRIPT>
function validateDGSearch(){
if(sform.q.value==""){
sform.q.value = "enter a search term"
return false;
}
else{
return true;
}
}
</SCRIPT>

<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="remove">
<!-- Welcome Row -->
<tr>
<td align="middle" valign="top" class="SiteLink" colSpan="3" height="1" cellSpacing="0" cellPadding="0" bgcolor="black">
<table cellSpacing="0" cellPadding="0" width="100%">
<tr>

<td align=left height="18" valign=top>&nbsp;<script>
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
treeOffset=0
singleMasterMenu=false

with(dropdown=new mm_style()){
oncolor="#000000";
onbgcolor="#DFEAFF";
offcolor="#FFFFFF";
offbgcolor="#000000";
padding=3;
separatorsize=0;
borderwidth=0;
fontfamily="verdana";
fontsize="10px";
subimage="/images/arrowdn.gif";
fontweight="bold";
position="relative";
}
with(dropdownsub=new mm_style()){
oncolor="#000000";
onbgcolor="#DFEAFF";
offcolor="#FFFFFF";
offbgcolor="#000000";
padding=3;
separatorsize=0;
borderwidth=0;
fontfamily="verdana";
fontsize="10px";
subimage="/images/arrowrt.gif";
position="relative";
}
with(dropdownsearch=new mm_style()){
oncolor="#FFFFFF";
onbgcolor="#FFFFFF";
offcolor="#FFFFFF";
offbgcolor="#FFFFFF";
padding=3;
separatorsize=0;
borderwidth=1;
bordercolor="#000000";
fontfamily="verdana";
fontsize="10px";
subimage="/images/arrowrt.gif";
position="relative";
}



with(milonic=new menuname("dropdowntop")){
style=dropdown;
alwaysvisible=1;
orientation="horizontal";

aI("text=Departments;url=#;showmenu=admin;");
aI("text=Offices;url=#;showmenu=offices;");
aI("text=Practice Areas;url=#;showmenu=areas;");
aI("text=Features;url=#;showmenu=features;");
aI("text=Dykema Sites;url=#;showmenu=sites;");
aI("text=Search;url=#;showmenu=search;");
}

with(milonic=new menuname("admin")){
style=dropdownsub;
overflow="scroll";
aI("text=Facilities;url=/facilities;");
aI("text=Finance/Accounting;url=/finance;");
aI("text=Human Resources;url=/HR;");
aI("text=Information Systems;url=/IS;");
aI("text=Library;url=/library;");
aI("text=Marketing;url=/marketing;");
aI("text=Technical Education & Support;url=/training;");
aI("text=Telecommunications;url=/telecomm;");
}

with(milonic=new menuname("litsupport")){
style=dropdownsub;
overflow="scroll";
aI("text=Litigation Support;url=/litigationsupport;");
}

with(milonic=new menuname("offices")){
style=dropdownsub;
overflow="scroll";
aI("text=Ann Arbor;url=/office/annarbor.asp;");
aI("text=Bloomfield Hills;url=/office/bloomfield.asp;");
aI("text=Chicago;url=/chicago;");
aI("text=Detroit;url=/detroit;");
aI("text=Grand Rapids;url=/grandrapids;");
aI("text=Lansing;url=/lansing;");
aI("text=Los Angeles;url=/office/losangeles.asp;");
aI("text=Washington, D.C.;url=/dc;");
}

with(milonic=new menuname("areas")){
style=dropdownsub;
overflow="scroll";
aI("text=Business Services;url=/business;showmenu=business;");
aI("text=Employment;url=/labor;");
aI("text=Government Policy;showmenu=government;");
aI("text=Litigation;url=/litigation;");
aI("text=Real Estate & Environmental;showmenu=realestate;");
aI("text=Taxation & Estates;showmenu=tax;");
}

with(milonic=new menuname("business")){
style=dropdownsub;
overflow="scroll";
aI("text=Automotive;url=/automotive;");
aI("text=Bankruptcy;url=/bankruptcy;");
aI("text=Biotechnology & Life Sciences;url=/biotech;");
aI("text=Construction Law;url=/construction;");
aI("text=Corporate Finance;showmenu=corpfin;");
aI("text=Health Care;url=/healthcare;");
aI("text=Intellectual Property;url=/IP;");
}

with(milonic=new menuname("corpfin")){
style=dropdownsub;
overflow="scroll";
aI("text=Brunswick;url=/brunswick;");
}

with(milonic=new menuname("government")){
style=dropdownsub;
overflow="scroll";
aI("text=Antitrust & Trade Regulation;url=/antitrust;");
aI("text=Government Policy;url=/government;");
}

with(milonic=new menuname("realestate")){
style=dropdownsub;
overflow="scroll";
aI("text=Environmental;url=/environmental;");
aI("text=Real Estate;url=/realestate;");
}

with(milonic=new menuname("tax")){
style=dropdownsub;
overflow="scroll";
aI("text=Employee Benefits;url=/employee;");
aI("text=Taxation & Estates;url=/tax;");
}

with(milonic=new menuname("features")){
style=dropdownsub;
overflow="scroll";
aI("text=Birthdays;url=/calendar/bdays.asp;");
aI("text=Classified Ads;url=/news;");
aI("text=Efiling;url=/efiling;");
aI("text=Electronic Library;url=/internet/online.asp;");
aI("text=Employee Connections;url=/connections;");
aI("text=Firm Committees;url=/general/committees.asp;");
aI("text=Firm Holidays;url=/calendar/bdays.asp?id=3;");
aI("text=Internet Link Directory;url=/internet;");
aI("text=Special Projects;showmenu=special;");
aI("text=Standard Practice Manual;url=/manual;");
aI("text=Ticket Exchange;url=/ticketexchange;");
}

with(milonic=new menuname("special")){
style=dropdownsub;
overflow="scroll";
aI("text=Brunswick;url=/brunswick;");
aI("text=Cingular;url=/cingular;");
aI("text=GlaxoSmithKline;url=/gsk;");
aI("text=Shell Oil;url=/shell;");
aI("text=UPS Core Counsel;url=/ups;");
}

with(milonic=new menuname("sites")){
style=dropdownsub;
overflow="scroll";
aI("text=Dykema Client Extranet;url=/extranet;");
aI("text=Ethics;url=/ethics;");
aI("text=Gaming Lawyers;url=http://www.gaminglawyers.net;");
aI("text=Michigan Adoption;url=http://www.michiganadoption.net;");
aI("text=Michigan Cybercourt;url=http://www.michigancybercourt.net;");
}

with(milonic=new menuname("search")){
style=dropdownsearch;
aI("text=<form method=get action='http://search/search?' name=sform id=sform><table cellspacing=0 cellpadding=0 cellspacing=0 cellpadding=0><input type=hidden name=site value=myDykema><input type=hidden name=filter value=0><input type=hidden name=client value=live_frontend><input type=hidden name=proxystylesheet value=live_frontend><input type=hidden name=output value=xml_no_dtd><tr><td><input onFocus='reset()' type=text name=q id=q size=25 maxlength=255 value=> <input type=image src='/images/search.gif' align=absmiddle onClick='return validateDGSearch()'><br><a href='http://search/search?access=p&sort=date%3AD%3AL%3Ad1&output=xml_no_dtd&site=myDykema&ie=UTF-8&oe=UTF-8&filter=0&client=live_frontend&proxystylesheet=live_frontend&proxycustom=<ADVANCED/>'>Advanced Search</a> <a href='/search/userhelp.asp'>Search Tips</a></td></tr></table></td></tr></form>;type=form;");
}


drawMenus()</script></td>
<td align=right noWrap class="SiteTitle">

<a href="/webteam" class="SiteTitle">WebTeam</a>&nbsp;&nbsp;&nbsp;

|&nbsp;&nbsp;&nbsp;<a href="http://mydykemadev/treetest.asp" class="SiteTitle">Dev</a>&nbsp;/&nbsp;&nbsp;<a href="http://mydykema/treetest.asp" class="SiteTitle">Prod</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;

<a href="" class="SiteTitle">Dykema.com</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
June 6, 2006
&nbsp;&nbsp;&nbsp;</td>
</tr>
</table>
</td>
</tr>

<tr>
<td height="1" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" id="remove">

<!----------------------Menu Start------------------------------------------------->
<!--<tr>
<td valign=center>INCLUDE VIRTUAL=/includes/google.asp</td>
</tr>-->
<tr>
<td style="background:#EAEAEA">
<table>
<tr>
<th align=left></th>
<td valign=top height="22" nowrap><script>
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
treeOffset=0
singleMasterMenu=false

with(appbuttons=new mm_style()){
oncolor="#FFFFFF";
onbgcolor="#000000";
offcolor="#000000";
offbgcolor="#EAEAEA";
padding=3;
separatorsize=0;
borderwidth=0;
fontfamily="verdana";
fontsize="9px";
position="relative";
}



with(milonic=new menuname("apps")){
style=appbuttons;
alwaysvisible=1;
orientation="horizontal";
aI("text=myReports;image=/images/mreports.gif;url=/reports/;");
aI("text=myHR;image=/images/myhr.gif;url=http://myhr;");
aI("text=E-Cat;image=/images/mcat.gif;url=http://207.67.203.76/D60002;");
aI("text=EIS;image=/images/meis.gif;url=/eis/;");
aI("text=Lexis;image=/images/mlexis.gif;url=http://www.lexis.com/;");
aI("text=Training;image=/images/mtraining.gif;url=/training/;");
aI("text=Virus;image=/images/mvirus.gif;url=/virus/;");
aI("text=Westlaw;image=/images/mwestlaw.gif;url=http://www.westlaw.com/;");
aI("text=WSG;image=/images/wgss.gif;url=http://www.worldservicesgroup.com/;showmenu=wsglist;");
}

with(milonic=new menuname("wsglist")){
style=appbuttons;
aI("text=Password List;url=/marketing/pdf/wsglist.pdf;");
}


drawMenus()</script></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height=300 valign=top>
<table width=99% cellspacing=0 cellpadding=2 border="0" align="center">

<tr>
<td width=150><script>
_menuCloseDelay=400;
_menuOpenDelay=150;
_subOffsetTop=0;
_subOffsetLeft=0;
treeOffset=17
singleMasterMenu=false

with(tree=new mm_style()){
oncolor="#000000";
onbgcolor="#FFFFFF";
offcolor="#000000";
offbgcolor="#FFFFFF";
padding=0;
separatorsize=0;
borderwidth=0;
fontfamily="verdana";
fontsize="9px";
subimage="/images/tree_trans.gif";
subimageposition="top left";
decoration="none";
ondecoration="underline";
type="tree";
menubgimage="/images/tree_bg.gif";
}



with(milonic=new menuname("treetop")){
style=tree;
alwaysvisible=1;
aI("text=Test Item 1;image=/images/icon_menu.gif;showmenu=level1;offclass=treeBeginItemCollapsed;clickclass=treeBeginItemExpanded;clickimage=/images/icon_menu_open.gif;overimage=/images/icon_menu_open.gif;");
aI("text=Test Item 2;image=/images/icon_item.gif;url=test.doc;offclass=treeEndItem;");
}

with(milonic=new menuname("level1")){
style=tree;
aI("text=Level 1 Item 1;image=/images/icon_item.gif;url=test.doc;offclass=treeItemCollapsed;clickclass=treeItemExpanded;");
aI("text=Level 1 Item 2;image=/images/icon_item.gif;url=test.doc;offclass=treeEndItem;");
}


drawMenus()</script></td>
<td colspan=2 valign=middle align=center></td>
</tr>
<tr>
<td></td>
<td><script>
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=0;
_subOffsetLeft=0;
treeOffset=0
singleMasterMenu=true

with(slide=new mm_style()){
oncolor="#FFFFFF";
onbgcolor="#D70B0B";
offcolor="#FFFFFF";
offbgcolor="#006699";
padding=2;
separatorsize=1;
separatorcolor="#003366";
borderwidth=1;
bordercolor="#000000";
borderstyle="solid";
fontfamily="verdana";
fontsize="9px";
subimage="/images/white_arrow.gif";
subimageposition="top right";
subimagepadding=3;
onsubimage="/images/white_arrow_down.gif";
ondecoration="underline";
image="/images/trans.gif";
imagepadding=2;
itemwidth=200;
clickcolor="#ffffff";
clickbgcolor="#D70B0B";
clickimage="/images/red_blip.gif";
clicksubimage="/images/white_arrow_down.gif";
}
with(slidesub1=new mm_style()){
oncolor="#FFFFFF";
onbgcolor="#D70B0B";
offcolor="#FFFFFF";
offbgcolor="#8EA2BB";
padding=2;
separatorsize=1;
separatorcolor="#556E8C";
borderwidth=1;
bordercolor="#000000";
borderstyle="solid";
fontfamily="verdana";
fontsize="9px";
subimage="/images/white_arrow.gif";
subimageposition="top right";
subimagepadding=3;
onsubimage="/images/white_arrow_down.gif";
ondecoration="underline";
image="/images/trans.gif";
imagepadding=2;
itemwidth=200;
clickcolor="#ffffff";
clickbgcolor="#D70B0B";
clickimage="/images/red_blip.gif";
clicksubimage="/images/white_arrow_down.gif";
}
with(slidesub2=new mm_style()){
oncolor="#FFFFFF";
onbgcolor="#D70B0B";
offcolor="#000000";
offbgcolor="#D6DDE6";
padding=2;
separatorsize=1;
separatorcolor="#8EA2BB";
borderwidth=1;
bordercolor="#000000";
borderstyle="solid";
fontfamily="verdana";
fontsize="9px";
subimage="/images/white_arrow.gif";
subimageposition="top right";
subimagepadding=3;
onsubimage="/images/white_arrow_down.gif";
ondecoration="underline";
image="/images/trans.gif";
imagepadding=2;
itemwidth=200;
clickcolor="#ffffff";
clickbgcolor="#D70B0B";
clickimage="/images/red_blip.gif";
clicksubimage="/images/white_arrow_down.gif";
}



with(milonic=new menuname("collapsetop")){
top=50
left=200
style=slide;
alwaysvisible=1;
itemwidth=200
aI("text=Test1;image=/images/blue_blip.gif;showmenu=collapse1;type=tree;overimage=/images/red_blip.gif;");
aI("text=Test1a;image=/images/blue_blip.gif;showmenu=collapse2;type=tree;overimage=/images/red_blip.gif;");
}

with(milonic=new menuname("collapse1")){
style=slidesub1;
margin=0
aI("text=Test2;image=/images/blue_blip.gif;showmenu=collapsesub1;type=tree;overimage=/images/red_blip.gif;");
aI("text=Test2a;url=#;");
}

with(milonic=new menuname("collapsesub1")){
style=slidesub2;
margin=0
aI("text=Test3;url=#;");
}

with(milonic=new menuname("collapse2")){
style=slidesub1;
margin=0
aI("text=Test4;url=#;");
}


drawMenus()</script></td>
<td valign=middle align=center></td>
</tr>
</table>