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

Is there a way to make all subs openonclick(able)?


Poster: Maestro
Dated: Thursday December 30 2004 - 1:38:31 GMT

My client gets particularly irritated at the way sub menus will pop open and has asked me to make all the subs openonclick as well.

Can this be done?

Sorry for so many questions.
-Tim :oops:


Poster: Ruth
Dated: Thursday December 30 2004 - 17:21:15 GMT

Yes, you can use the openonclick="true";

The references for various menu properties can be found at:

http://www.milonic.com/styleproperties.php
http://www.milonic.com/menuproperties.php
http://www.milonic.com/itemproperties.php
http://www.milonic.com/global_properties

I'm not sure if that openonclick can be placed as a global property, that is the area of the menu_data.js file that has the menuOpenDelay etc.

Ruth

I've tried, but fore some reason it doesn't work (exactly)


Poster: Maestro
Dated: Thursday December 30 2004 - 17:55:42 GMT

Here's the code.
Notice that I have placed openonclick="true"; at the top, in the main_menu, and in all but the last few sub menus.

It only works at the level of the main menu.
After that, the sub menus open on rollover.

See http://fbcity.securesitehosts.com/default2.html

Just for clarity, here's what I'm hoping to accomplish..
If I click on "Departments" that element's sub menu should open.

Then, if I roll over an adjascent (to "Departments") element in the same menu, the oncolor or onbgimage would and should change as expected, but the sub menu (the one that opened when I originally clicked on "Departments") would remain visible, even though I had rolled over an adjascent element, until I either click the adjascent element (which would open that element's sub menu), or I click an element in the currently visible sub menu (which should only then open that sub element's sub sub menu.

I want these same rules to apply on all the sub menus.
In other words, is there a way to turn off menus opening on rollovers, except where I really want that to occure?

From the online documentation, this is what I would expect to happen.
But, not so.

The single most disliked thing about DHTML menu systems I've heard from my customers is the way they open on rollover. Most would prefer the open on click method.

Thanks for all your help.
-Tim

Code:
/*
Milonic DHTML Menu - JavaScript Website Navigation System.
Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
Version 5+ Data File structure is the property of Milonic Solutions Ltd and must only be used in Milonic DHTML Products
This is a commercial software product, please visit http://www.milonic.com/ for more information.
See http://www.milonic.com/license.php for Commercial License Agreement
All Copyright statements must always remain in place in all files at all times
*******  PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE  *******
*/

buildAllMenus=1;
retainClickValue=1;
_menuCloseDelay=500          // The time delay for menus to remain visible on mouse out
_menuOpenDelay=500            // The time delay before menus open on mouse over
_subOffsetTop=-5              // Sub menu top offset
_subOffsetLeft=5            // Sub menu left offset

// DEFINE any custom functions nex..
/*
See: http://www.milonic.com/forum/viewtopic.php?p=14348#14348 for a full explanation
*/
function mm_changeItemProperty(menuName, itemName, codeRef, newValue, updateDisplay)
{
  menuName = menuName.toLowerCase();
  for (i=0; i<_mi.length; i++)
    if (_mi[i][1].replace(/\&nbsp\;/ig,' ') == itemName && _m[_mi[i][0]][1] == menuName) break;
  if (i == _mi.length) return;
  _mi[i][codeRef] = newValue;
  if (updateDisplay) BDMenu(_mi[i][0]);
}

/*
See: http://www.milonic.com/forum/viewtopic.php?t=4853&highlight=type+form for a full explanation
*/
function mm_changeMenuProperty(menuName, propertyRef, newValue)
{
  var menuNum = getMenuByName(menuName);
  _m[menuNum][propertyRef] = newValue;
  BDMenu(menuNum);
}


// DEFINE the styles used by the various menues & sub menues

with(TopMainMenuStyle=new mm_style()){
openonclick=1;
closeonclick=1;
onbgcolor="#23243F";
oncolor="#ffffff";
onborder='0px solid #ffffff';
offbgcolor="none";
offcolor="#fff";
separatorcolor="#2D729D";
separatorsize="1";
padding=5;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagebgimage="images/inverseSubOneNav_bg.png";
headercolor="#FBDFB4";
headerbgcolor="none";
bordercolor="none";
}

with(TopSubTwoHeaderStyle=new mm_style()){
openonclick=1;
closeonclick=1;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
bgimage="images/trans_BlueGrey.png";
align="right";
valign="middle";
bordercolor="#FFFFFF";
borderwidth="1px";
borderstyle="solid";
padding="2px";
}


with(TopPDFsByDepartmentStyle=new mm_style()){
openonclick=1;
closeonclick=1;
onbgcolor="#ccffcc";
oncolor="#000000";
offbgcolor="#cccccc";
offcolor="#99061C";
bordercolor="#292B4A";
borderstyle="solid";
borderwidth=1;
padding=5;
fontsize="12px";
fontstyle="normal";
fontweight="normal";
fontfamily="Verdana, Tahoma, Arial";
headercolor="#FFFFFF";
headerbgcolor="#292B4A";
imagepadding="0 20 0 10";
}


/* These are variants of the TopMainMenuStyle */
TopSubOneMainMenuStyle=new copyOf(TopMainMenuStyle);
TopSubOneMainMenuStyle.bgimage="images/trans_BlueGrey.png";
TopSubOneMainMenuStyle.pagebgimage="images/inverseSubOneNav_bg.png";
TopSubOneMainMenuStyle.pageborder='1px solid #ffffff';;
TopSubOneMainMenuStyle.padding=10;

/* These are variants of the TopMainMenuStyle - One layer down */
TopSubTwoMainMenuStyle=new copyOf(TopSubOneMainMenuStyle);
TopSubTwoMainMenuStyle.padding=5;
TopSubTwoMainMenuStyle.bgimage="images/normalSubTwoNav_bg.gif";
TopSubTwoMainMenuStyle.overbgimage="images/overSubTwoNav_bg.gif";
TopSubTwoMainMenuStyle.pagebgimage="images/inverseSubTwoNav_bg.gif";
TopSubTwoMainMenuStyle.onbgcolor="none";
TopSubTwoMainMenuStyle.separatoralign="left";
TopSubTwoMainMenuStyle.separatorwidth="221";
TopSubTwoMainMenuStyle.pageborder="none";
TopSubTwoMainMenuStyle.oncolor="#2847AA";

/* These are variants of the TopMainMenuStyle - Two layers down */
TopSubThreeMainMenuStyle=new copyOf(TopSubOneMainMenuStyle);
TopSubThreeMainMenuStyle.openonclick=1;
TopSubThreeMainMenuStyle.align="center";
TopSubThreeMainMenuStyle.offcolor="#FBDFB4";
TopSubThreeMainMenuStyle.offbgcolor="#292B4A";
TopSubThreeMainMenuStyle.oncolor="gold";
TopSubThreeMainMenuStyle.onbgcolor="#292B4A";
TopSubThreeMainMenuStyle.bgimage="none";
TopSubThreeMainMenuStyle.bordercolor="#292B4A";
TopSubThreeMainMenuStyle.borderstyle="solid";
TopSubThreeMainMenuStyle.borderwidth=0;
TopSubThreeMainMenuStyle.imagepadding="0 15 0 15";


// "Main Menue" - the items shown in the top navigation bar
with(milonic=new menuname("Main Menu")){
style=TopMainMenuStyle;
top=62;
left=300;
//itemheight=38;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=#;status=Back To Home Page;");
aI("text=Departments;showmenu=TopDepartments;");
aI("text=Library;showmenu=TopLibrary;");
aI("text=Search;showmenu=TopSearch;");
aI("text=My City;showmenu=TopMyCity;");
}

// Sub to "Main Menue" are the five main departments
with(milonic=new menuname("TopDepartments")){
style=TopSubOneMainMenuStyle;
top=92;
screenposition="left";
left="offset=10";
orientation="horizontal";
menuwidth=580;
aI("text=City Clerk;showmenu=TopCityClerk;");
aI("text=City Council;showmenu=TopCityCouncil;");
aI("text=Community Development;showmenu=TopCommunityDevelopment;");
aI("text=Police Dept;showmenu=TopPoliceDept;");
aI("text=Finance;showmenu=TopFinance;");
}


// Categories belonging to "City Clerk" department
with(milonic=new menuname("TopCityClerk")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
openonclick="true";
aI("text=Municipal Code;url=#;");
aI("text=Town Hall Use;url=#;");
aI("text=Consultants & Contractors: <br>&nbsp;&nbsp;City Insurance;url=#;");
aI("text=Requests for Proposals & Bids;url=#;");
aI("text=Encroachments;url=#;");
aI("text=City Elections;url=#;");
aI("text=FPPC & County Website Links;url=#;");
}


// Categories belonging to "City Council" department
with(milonic=new menuname("TopCityCouncil")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
openonclick="true";
aI("text=Agendas & Minutes;url=#;");
aI("text=Council Members;url=#;");
aI("text=City Council: <br>&nbsp;&nbsp;Calendar of Events;url=#;");
aI("text=How to's;url=#;");
aI("text=FAQ;url=#;");
}


// Categories belonging to "Community Development" department
with(milonic=new menuname("TopCommunityDevelopment")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
openonclick="true";
aI("text=Planning Commission;url=#;");
aI("text=Public Hearing Notices;url=#;");
aI("text=Land Use & Development;url=#;");
aI("text=Citywide Design Guidelines;url=#;");
aI("text=General Plan;url=#;");
aI("text=Mayor's \"Well Done Award\";url=#;");
aI("text=Planning Permit Brochures;url=#;");
aI("text=Editable Planning Application;url=#;");
aI("text=GP Planning Page;url=#;");
aI("text=FAQ;url=#;");
}


// Categories belonging to "Police" department
with(milonic=new menuname("TopPoliceDept")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
openonclick="true";
aI("text=Mission Statement;url=#;");
aI("text=Meet the Officers;url=#;");
aI("text=COPPS Projects & Info;url=#;");
aI("text=Code of Ethics;url=#;");
aI("text=PAL Activities<br>&nbsp;&nbsp;and Board Members;url=/default2.html;");
aI("text=Local Missing Persons;url=#;");
aI("text=The Tipster Program;url=#;");
aI("text=The Police Cadets Program;url=#;");
aI("text=Job Opportunities;url=#;");
aI("text=Schedule of Fees;url=#;");
aI("text=Fingerprinting;url=#;");
aI("text=Schedule of Upcomming Events;url=#;");
aI("text=Gang Awareness;url=#;");
aI("text=Graffiti Program;url=#;");
aI("text=Office Hours;url=#;");
aI("text=Frequently Requested Forms;url=#;");
aI("text=Links;url=#;");
aI("text=FAQ;url=#;");
}


// Categories belonging to "Finance" department
with(milonic=new menuname("TopFinance")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
openonclick="true";
aI("text=City Treasurer;url=#;");
aI("text=Fiscal Responsibilities<br>&nbsp;&nbsp;and Mandates;url=#;");
aI("text=Frequently Requested Forms;url=#;");
aI("text=Documents;url=#;");
aI("text=FAQ;url=#;");
}

/* NEXT: the Documents "Library"  */
// Can be dynamically generated from the PDF Searchable DB
// Grouped by Department or Category
with(milonic=new menuname("TopLibrary")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="91";
itemwidth=580;
openonclick="true";
aI("text=Draw from an extensive library of usefull city forms and documents.<br>All in downloadable (PDF) format;type=header;itemheight=38;bgimage=images/trans_BlueGrey.png;onbgcolor=none;pagebgimage=none;headerborder=1px solid #FFFFFF;rawcss=font-variant:small-caps;align=center;margin=10;");
aI("text=Organized<br>&nbsp;&nbsp;by General Category;showmenu=TopPDFsByCategoryOne;");
aI("text=Organized<br>&nbsp;&nbsp;by Department of Origin;showmenu=TopPDFsByDepartment;");
aI("text=Document Search Tool;url=#;");
aI("text=FAQ;url=#;");
}


// PDFs by Category#1 - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryOne")){
style=TopSubThreeMainMenuStyle;
top=133;
left=232;
itemwidth=167;
itemheight=40;
orientation="horizontal";
aI("text=DOCUMENTS;showmenu=TopPDFsByCategoryDocksTwo;fontsize=75%;padding=2;image=images/pdf.gif;imageposition=left;");
aI("text=FORMS;showmenu=TopPDFsByCategoryFormsTwo;fontsize=75%;padding=2;image=images/pdf.gif;imageposition=right;");
}

// PDFs by Category Docs#2 - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryDocksTwo")){
style=TopSubThreeMainMenuStyle;
top=173;
left=232;
itemwidth=147;
itemheight=40;
orientation="horizontal";
aI("text=<font size=-2>by</font><br>Department;align=right;showmenu=TopPDFsByCategoryDocsThreeByDept;fontsize=75%;rawcss=padding-right:15px;");
aI("text=<font size=-2>by</font><br>Need;align=left;showmenu=TopPDFsByCategoryDocsThreeByNeed;fontsize=75%;rawcss=padding-left:1px;");
}

// PDFs by Category Forms#2 - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryFormsTwo")){
style=TopSubThreeMainMenuStyle;
top=173;
left=232;
itemwidth=147;
itemheight=40;
orientation="horizontal";
aI("text=<font size=-2>by</font><br>Department;align=right;showmenu=TopPDFsByCategoryFormsThreeByDept;fontsize=75%;rawcss=padding-right:15px;");
aI("text=<font size=-2>by</font><br>Need;align=left;showmenu=TopPDFsByCategoryFormsThreeByNeed;fontsize=75%;rawcss=padding-left:1px;");
}

// PDFs by Category Docs#3 byDept - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryDocsThreeByDept")){
style=TopPDFsByDepartmentStyle;
top=213;
left=232;
itemwidth=333;
overflow="scroll";
aI("type=header;text=<font color=gold>City Clerk</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Town Hall Use;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Insurance Requirements;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>City Council</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=City Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (most recent);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (archived);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=How to put an item on the Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDC Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=F & A Commitee Agendas and Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Safety Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Works Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDAB Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Police Department</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Press Releases;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CHP 555 short;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Info Only Report;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}

// PDFs by Category Docs#3 byNeed - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryDocsThreeByNeed")){
style=TopPDFsByDepartmentStyle;
top=213;
left=232;
itemwidth=333;
overflow="scroll";
aI("type=header;text=<font color=gold>Proceedures & Policies</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Town Hall Use;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Insurance Requirements;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=How to put an item on the Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Agendas, Minutes & Public Records</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=City Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (most recent);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (archived);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDC Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=F & A Commitee Agendas and Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Safety Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Works Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDAB Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Press Releases;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Miscellaneous</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=CHP 555 short;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Police Info Only Report;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}

// PDFs by Category Forms#3 byDept - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryFormsThreeByDept")){
style=TopPDFsByDepartmentStyle;
top=213;
left=232;
itemwidth=333;
overflow="scroll";
aI("type=header;text=<font color=gold>City Clerk</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Public Records Request;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Encroachment Permit Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>City Council</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Speaker Card Forms;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Police Department</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Cadet Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Job Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Parking Ticket Appeal;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}

// PDFs by Category Forms#3 byNeed - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryFormsThreeByNeed")){
style=TopPDFsByDepartmentStyle;
top=213;
left=232;
itemwidth=333;
overflow="scroll";
aI("type=header;text=<font color=gold>Permits & Applications</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Encroachment Permit Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Cadet Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Job Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Request & Appeal Forms</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Public Records Request;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Parking Ticket Appeal;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Miscellaneous</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Speaker Card Forms;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}



// PDFs by Department - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByDepartment")){
style=TopPDFsByDepartmentStyle;
top=133;
left=232;
itemwidth=340;
overflow="scroll";
aI("type=header;text=from the <font color=gold>&nbsp; City Clerk</font>;image=images/pdf.gif;rawcss=font-variant:small-caps;");
aI("text=Public Records Request;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Town Hall Use;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Insurance Requirements;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Encroachment Permit Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=from the <font color=gold>&nbsp; City Council</font>;image=images/pdf.gif;rawcss=font-variant:small-caps;");
aI("text=City Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (most recent);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (archived);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Speaker Card Forms;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=How to put an item on the Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDC Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=F & A Commitee Agendas and Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Safety Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Works Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDAB Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=from the <font color=gold>&nbsp; Police Department</font>;image=images/pdf.gif;rawcss=font-variant:small-caps;");
aI("text=Cadet Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Job Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Press Releases;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CHP 555 short;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Info Only Report;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Parking Ticket Appeal;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}


// Simple search
with(milonic=new menuname("TopSearch")){
style=TopSubTwoHeaderStyle;
screenposition="left";
left="offset=10";
top="91";
itemwidth=579;
aI("type=header;rawcss=font-variant:small-caps;text=<form name=form1 action=#><font color=#FBDFB4>Do a simple search of this site... </font><input style=background-color:#EBE689 type=text name=simplesearch> <input type=submit value=search></form>;");
}

// Example, using TopMyCity of form when "type=header"
with(milonic=new menuname("TopMyCity")){
style=TopSubTwoHeaderStyle;
screenposition="left";
left="offset=10";
top="91";
itemwidth=579;
//aI("type=header;rawcss=font-variant:small-caps;text=<form name=form2 action=http://pdaoutlet.biz/cgi-bin/mail.cgi><input type=hidden name=flavor value=subscribe><input type=hidden name=list value=pda><font color=#FBDFB4>Our Newsletter... </font><input style=background-color:#EBE689 type=text name=email> <input type=submit value=Subscribe></form>;");
}

drawMenus();

[/url]

I found this post - it does not work however..


Poster: Maestro
Dated: Thursday December 30 2004 - 19:27:25 GMT

In post
http://www.milonic.com/forum/viewtopic.php?t=4256&highlight=open+multiple+menues

Some it was suggested..
Quote:
Yes, openonclick is to be used either as a menu style property (as John said) or as an item property. If you use it in a menu style, it is important to set it in the style used by the menu doing the opening, not in the style (if its a different one) of the menu to be opened. You can also use openonclick on an item-by-item basis, by setting it in the aI() string of the menu item that opens the submenu.


I tried it (see below), but it did not work.

Code:
/*
Milonic DHTML Menu - JavaScript Website Navigation System.
Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
Version 5+ Data File structure is the property of Milonic Solutions Ltd and must only be used in Milonic DHTML Products
This is a commercial software product, please visit http://www.milonic.com/ for more information.
See http://www.milonic.com/license.php for Commercial License Agreement
All Copyright statements must always remain in place in all files at all times
*******  PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE  *******
*/

buildAllMenus=1;
retainClickValue=1;
_menuCloseDelay=500          // The time delay for menus to remain visible on mouse out
_menuOpenDelay=500            // The time delay before menus open on mouse over
_subOffsetTop=-5              // Sub menu top offset
_subOffsetLeft=5            // Sub menu left offset

// DEFINE any custom functions nex..
/*
See: http://www.milonic.com/forum/viewtopic.php?p=14348#14348 for a full explanation
*/
function mm_changeItemProperty(menuName, itemName, codeRef, newValue, updateDisplay)
{
  menuName = menuName.toLowerCase();
  for (i=0; i<_mi.length; i++)
    if (_mi[i][1].replace(/\&nbsp\;/ig,' ') == itemName && _m[_mi[i][0]][1] == menuName) break;
  if (i == _mi.length) return;
  _mi[i][codeRef] = newValue;
  if (updateDisplay) BDMenu(_mi[i][0]);
}

/*
See: http://www.milonic.com/forum/viewtopic.php?t=4853&highlight=type+form for a full explanation
*/
function mm_changeMenuProperty(menuName, propertyRef, newValue)
{
  var menuNum = getMenuByName(menuName);
  _m[menuNum][propertyRef] = newValue;
  BDMenu(menuNum);
}


// DEFINE the styles used by the various menues & sub menues

with(TopMainMenuStyle=new mm_style()){
openonclick=1;
closeonclick=1;
onbgcolor="#23243F";
oncolor="#ffffff";
onborder='0px solid #ffffff';
offbgcolor="none";
offcolor="#fff";
separatorcolor="#2D729D";
separatorsize="1";
padding=5;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagebgimage="images/inverseSubOneNav_bg.png";
headercolor="#FBDFB4";
headerbgcolor="none";
bordercolor="none";
}

with(TopSubTwoHeaderStyle=new mm_style()){
openonclick=1;
closeonclick=1;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
bgimage="images/trans_BlueGrey.png";
align="right";
valign="middle";
bordercolor="#FFFFFF";
borderwidth="1px";
borderstyle="solid";
padding="2px";
}


with(TopPDFsByDepartmentStyle=new mm_style()){
openonclick=1;
closeonclick=1;
onbgcolor="#ccffcc";
oncolor="#000000";
offbgcolor="#cccccc";
offcolor="#99061C";
bordercolor="#292B4A";
borderstyle="solid";
borderwidth=1;
padding=5;
fontsize="12px";
fontstyle="normal";
fontweight="normal";
fontfamily="Verdana, Tahoma, Arial";
headercolor="#FFFFFF";
headerbgcolor="#292B4A";
imagepadding="0 20 0 10";
}


with(AdvancedSearchSubTabStyle=new mm_style()){
openonclick=1;
closeonclick=1;
onbgcolor="#ccffcc";
oncolor="#000000";
offbgcolor="#cccccc";
offcolor="#0000CC";
bordercolor="#292B4A";
borderstyle="solid";
borderwidth=1;
padding=5;
fontsize="12px";
fontweight="normal";
fontfamily="Verdana, Tahoma, Arial";
headercolor="#FFFFFF";
headerbgcolor="#292B4A";
imagepadding="0 20 0 10";
}



/* These are variants of the TopMainMenuStyle */
TopSubOneMainMenuStyle=new copyOf(TopMainMenuStyle);
TopSubOneMainMenuStyle.bgimage="images/trans_BlueGrey.png";
TopSubOneMainMenuStyle.pagebgimage="images/inverseSubOneNav_bg.png";
TopSubOneMainMenuStyle.pageborder='1px solid #ffffff';;
TopSubOneMainMenuStyle.padding=10;

/* These are variants of the TopMainMenuStyle - One layer down */
TopSubTwoMainMenuStyle=new copyOf(TopSubOneMainMenuStyle);
TopSubTwoMainMenuStyle.padding=5;
TopSubTwoMainMenuStyle.bgimage="images/normalSubTwoNav_bg.gif";
TopSubTwoMainMenuStyle.overbgimage="images/overSubTwoNav_bg.gif";
TopSubTwoMainMenuStyle.pagebgimage="images/inverseSubTwoNav_bg.gif";
TopSubTwoMainMenuStyle.onbgcolor="none";
TopSubTwoMainMenuStyle.separatoralign="left";
TopSubTwoMainMenuStyle.separatorwidth="221";
TopSubTwoMainMenuStyle.pageborder="none";
TopSubTwoMainMenuStyle.oncolor="#2847AA";

/* These are variants of the TopMainMenuStyle - Two layers down */
TopSubThreeMainMenuStyle=new copyOf(TopSubOneMainMenuStyle);
TopSubThreeMainMenuStyle.openonclick=1;
TopSubThreeMainMenuStyle.align="center";
TopSubThreeMainMenuStyle.offcolor="#FBDFB4";
TopSubThreeMainMenuStyle.offbgcolor="#292B4A";
TopSubThreeMainMenuStyle.oncolor="gold";
TopSubThreeMainMenuStyle.onbgcolor="#292B4A";
TopSubThreeMainMenuStyle.bgimage="none";
TopSubThreeMainMenuStyle.bordercolor="#292B4A";
TopSubThreeMainMenuStyle.borderstyle="solid";
TopSubThreeMainMenuStyle.borderwidth=0;
TopSubThreeMainMenuStyle.imagepadding="0 15 0 15";


// "Main Menue" - the items shown in the top navigation bar
with(milonic=new menuname("Main Menu")){
style=TopMainMenuStyle;
top=62;
left=300;
//itemheight=38;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=#;status=Back To Home Page;");
aI("text=Departments;showmenu=TopDepartments;");
aI("text=Library;showmenu=TopLibrary;");
aI("text=Search;showmenu=TopSearch;");
aI("text=My City;showmenu=TopMyCity;");
}

// Sub to "Main Menue" are the five main departments
with(milonic=new menuname("TopDepartments")){
style=TopSubOneMainMenuStyle;
top=92;
screenposition="left";
left="offset=10";
orientation="horizontal";
menuwidth=580;
aI("openonclick=1;text=City Clerk;showmenu=TopCityClerk;");
aI("openonclick=1;text=City Council;showmenu=TopCityCouncil;");
aI("openonclick=1;text=Community Development;showmenu=TopCommunityDevelopment;");
aI("openonclick=1;text=Police Dept;showmenu=TopPoliceDept;");
aI("openonclick=1;text=Finance;showmenu=TopFinance;");
}


// Categories belonging to "City Clerk" department
with(milonic=new menuname("TopCityClerk")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
aI("openonclick=1;text=Municipal Code;url=#;");
aI("openonclick=1;text=Town Hall Use;url=#;");
aI("openonclick=1;text=Consultants & Contractors: <br>&nbsp;&nbsp;City Insurance;url=#;");
aI("openonclick=1;text=Requests for Proposals & Bids;url=#;");
aI("openonclick=1;text=Encroachments;url=#;");
aI("openonclick=1;text=City Elections;url=#;");
aI("openonclick=1;text=FPPC & County Website Links;url=#;");
}


// Categories belonging to "City Council" department
with(milonic=new menuname("TopCityCouncil")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
aI("openonclick=1;text=Agendas & Minutes;url=#;");
aI("openonclick=1;text=Council Members;url=#;");
aI("openonclick=1;text=City Council: <br>&nbsp;&nbsp;Calendar of Events;url=#;");
aI("openonclick=1;text=How to's;url=#;");
aI("openonclick=1;text=FAQ;url=#;");
}


// Categories belonging to "Community Development" department
with(milonic=new menuname("TopCommunityDevelopment")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
aI("openonclick=1;text=Planning Commission;url=#;");
aI("openonclick=1;text=Public Hearing Notices;url=#;");
aI("openonclick=1;text=Land Use & Development;url=#;");
aI("openonclick=1;text=Citywide Design Guidelines;url=#;");
aI("openonclick=1;text=General Plan;url=#;");
aI("openonclick=1;text=Mayor's \"Well Done Award\";url=#;");
aI("openonclick=1;text=Planning Permit Brochures;url=#;");
aI("openonclick=1;text=Editable Planning Application;url=#;");
aI("openonclick=1;text=GP Planning Page;url=#;");
aI("openonclick=1;text=FAQ;url=#;");
}


// Categories belonging to "Police" department
with(milonic=new menuname("TopPoliceDept")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
aI("openonclick=1;text=Mission Statement;url=#;");
aI("openonclick=1;text=Meet the Officers;url=#;");
aI("openonclick=1;text=COPPS Projects & Info;url=#;");
aI("openonclick=1;text=Code of Ethics;url=#;");
aI("openonclick=1;text=PAL Activities<br>&nbsp;&nbsp;and Board Members;url=/default2.html;");
aI("openonclick=1;text=Local Missing Persons;url=#;");
aI("openonclick=1;text=The Tipster Program;url=#;");
aI("openonclick=1;text=The Police Cadets Program;url=#;");
aI("openonclick=1;text=Job Opportunities;url=#;");
aI("openonclick=1;text=Schedule of Fees;url=#;");
aI("openonclick=1;text=Fingerprinting;url=#;");
aI("openonclick=1;text=Schedule of Upcomming Events;url=#;");
aI("openonclick=1;text=Gang Awareness;url=#;");
aI("openonclick=1;text=Graffiti Program;url=#;");
aI("openonclick=1;text=Office Hours;url=#;");
aI("openonclick=1;text=Frequently Requested Forms;url=#;");
aI("openonclick=1;text=Links;url=#;");
aI("openonclick=1;text=FAQ;url=#;");
}


// Categories belonging to "Finance" department
with(milonic=new menuname("TopFinance")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=580;
aI("openonclick=1;text=City Treasurer;url=#;");
aI("openonclick=1;text=Fiscal Responsibilities<br>&nbsp;&nbsp;and Mandates;url=#;");
aI("openonclick=1;text=Frequently Requested Forms;url=#;");
aI("openonclick=1;text=Documents;url=#;");
aI("openonclick=1;text=FAQ;url=#;");
}

/* NEXT: the Documents "Library"  */
// Can be dynamically generated from the PDF Searchable DB
// Grouped by Department or Category
with(milonic=new menuname("TopLibrary")){
style=TopSubTwoMainMenuStyle;
screenposition="left";
left="offset=11";
top="91";
itemwidth=580;
aI("text=Draw from an extensive library of usefull city forms and documents.<br>All in downloadable (PDF) format;type=header;itemheight=38;bgimage=images/trans_BlueGrey.png;onbgcolor=none;pagebgimage=none;headerborder=1px solid #FFFFFF;rawcss=font-variant:small-caps;align=center;margin=10;");
aI("openonclick=1;text=Organized<br>&nbsp;&nbsp;by General Category;showmenu=TopPDFsByCategoryOne;");
aI("openonclick=1;text=Organized<br>&nbsp;&nbsp;by Department of Origin;showmenu=TopPDFsByDepartment;");
aI("openonclick=1;text=Document Search Tool;url=#;");
aI("openonclick=1;text=FAQ;url=#;");
}


// PDFs by Category#1 - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryOne")){
style=TopSubThreeMainMenuStyle;
top=133;
left=232;
itemwidth=167;
itemheight=40;
orientation="horizontal";
aI("text=DOCUMENTS;showmenu=TopPDFsByCategoryDocksTwo;fontsize=75%;padding=2;image=images/pdf.gif;imageposition=left;");
aI("text=FORMS;showmenu=TopPDFsByCategoryFormsTwo;fontsize=75%;padding=2;image=images/pdf.gif;imageposition=right;");
}

// PDFs by Category Docs#2 - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryDocksTwo")){
style=TopSubThreeMainMenuStyle;
top=173;
left=232;
itemwidth=147;
itemheight=40;
orientation="horizontal";
aI("text=<font size=-2>by</font><br>Department;align=right;showmenu=TopPDFsByCategoryDocsThreeByDept;fontsize=75%;rawcss=padding-right:15px;");
aI("text=<font size=-2>by</font><br>Need;align=left;showmenu=TopPDFsByCategoryDocsThreeByNeed;fontsize=75%;rawcss=padding-left:1px;");
}

// PDFs by Category Forms#2 - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryFormsTwo")){
style=TopSubThreeMainMenuStyle;
top=173;
left=232;
itemwidth=147;
itemheight=40;
orientation="horizontal";
aI("text=<font size=-2>by</font><br>Department;align=right;showmenu=TopPDFsByCategoryFormsThreeByDept;fontsize=75%;rawcss=padding-right:15px;");
aI("text=<font size=-2>by</font><br>Need;align=left;showmenu=TopPDFsByCategoryFormsThreeByNeed;fontsize=75%;rawcss=padding-left:1px;");
}

// PDFs by Category Docs#3 byDept - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryDocsThreeByDept")){
style=TopPDFsByDepartmentStyle;
top=213;
left=232;
itemwidth=333;
overflow="scroll";
aI("type=header;text=<font color=gold>City Clerk</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Town Hall Use;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Insurance Requirements;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>City Council</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=City Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (most recent);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (archived);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=How to put an item on the Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDC Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=F & A Commitee Agendas and Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Safety Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Works Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDAB Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Police Department</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Press Releases;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CHP 555 short;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Info Only Report;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}

// PDFs by Category Docs#3 byNeed - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryDocsThreeByNeed")){
style=TopPDFsByDepartmentStyle;
top=213;
left=232;
itemwidth=333;
overflow="scroll";
aI("type=header;text=<font color=gold>Proceedures & Policies</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Town Hall Use;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Insurance Requirements;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=How to put an item on the Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Agendas, Minutes & Public Records</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=City Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (most recent);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (archived);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDC Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=F & A Commitee Agendas and Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Safety Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Works Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDAB Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Press Releases;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Miscellaneous</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=CHP 555 short;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Police Info Only Report;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}

// PDFs by Category Forms#3 byDept - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryFormsThreeByDept")){
style=TopPDFsByDepartmentStyle;
top=213;
left=232;
itemwidth=333;
overflow="scroll";
aI("type=header;text=<font color=gold>City Clerk</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Public Records Request;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Encroachment Permit Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>City Council</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Speaker Card Forms;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Police Department</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Cadet Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Job Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Parking Ticket Appeal;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}

// PDFs by Category Forms#3 byNeed - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByCategoryFormsThreeByNeed")){
style=TopPDFsByDepartmentStyle;
top=213;
left=232;
itemwidth=333;
overflow="scroll";
aI("type=header;text=<font color=gold>Permits & Applications</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Encroachment Permit Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Cadet Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Job Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Request & Appeal Forms</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Public Records Request;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Parking Ticket Appeal;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=<font color=gold>Miscellaneous</font>;rawcss=font-variant:small-caps;align=center;");
aI("text=Speaker Card Forms;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}



// PDFs by Department - 2B Dynamic byLasso
with(milonic=new menuname("TopPDFsByDepartment")){
style=TopPDFsByDepartmentStyle;
top=133;
left=232;
itemwidth=340;
overflow="scroll";
aI("type=header;text=from the <font color=gold>&nbsp; City Clerk</font>;image=images/pdf.gif;rawcss=font-variant:small-caps;");
aI("text=Public Records Request;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Town Hall Use;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Insurance Requirements;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Encroachment Permit Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=from the <font color=gold>&nbsp; City Council</font>;image=images/pdf.gif;rawcss=font-variant:small-caps;");
aI("text=City Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (most recent);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=City Council Minutes (archived);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Speaker Card Forms;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=How to put an item on the Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDC Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=F & A Commitee Agendas and Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Safety Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Public Works Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CDAB Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");

aI("type=header;text=from the <font color=gold>&nbsp; Police Department</font>;image=images/pdf.gif;rawcss=font-variant:small-caps;");
aI("text=Cadet Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Job Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Press Releases;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=CHP 555 short;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Info Only Report;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
aI("text=Parking Ticket Appeal;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
}


// Simple search
with(milonic=new menuname("TopSearch")){
style=TopSubTwoHeaderStyle;
screenposition="left";
left="offset=10";
top="91";
itemwidth=579;
aI("type=form;rawcss=font-variant:small-caps;showmenu=AdvancedSearch;text=<form name=form1 action=#><font color=#FBDFB4>Do a simple search of this site... </font><input style=background-color:#EBE689 type=text name=simplesearch> <input type=submit value=search></form>;");
}

// Sub search (advanced) tab
with(milonic=new menuname("AdvancedSearch")){
style=AdvancedSearchSubTabStyle;
screenposition="left";
left="offset=11";
top="131";
itemwidth=577;
aI("text=<font size=-2>Alternately, try an</font> <u><font style=font-variant:small-caps>Advanced Search</font></u>;align=right;");
}


// Example, using TopMyCity of form when "type=header"
with(milonic=new menuname("TopMyCity")){
style=TopSubTwoHeaderStyle;
screenposition="left";
left="offset=10";
top="91";
itemwidth=577;
//aI("type=header;rawcss=font-variant:small-caps;text=<form name=form2 action=http://pdaoutlet.biz/cgi-bin/mail.cgi><input type=hidden name=flavor value=subscribe><input type=hidden name=list value=pda><font color=#FBDFB4>Our Newsletter... </font><input style=background-color:#EBE689 type=text name=email> <input type=submit value=Subscribe></form>;");
}

drawMenus();


Poster: Ruth
Dated: Thursday December 30 2004 - 20:50:00 GMT

Hi,
You have retainClickValue=1; if I understand correctly this means that it makes the menu function as most desktop application which have a click to open the first menu and then the rest open on mouseover. Eliminate that and the menus open on click.

Also, if I understand you correctly you want them to open and remain open until another menu is clicked? I think that might take a function of some kind because the way the menu works now, you can set open on click and close on click but if you mouse over another item, even though it won't open a menu it does close the one that is open.

Ruth

That works now..


Poster: Maestro
Dated: Thursday December 30 2004 - 21:42:17 GMT

There's one small problem though..

There are some occasions when I WANT a sub menu to open when its parent menu is rolled over.

For example (See: http://fbcity.securesitehosts.com/default2.html) with all others now set (and working) to openonclick=1; I would like it that after clicking on "Search" in the main-menu rolling over the resulting sub menu would open the sub menu to that.

This was working until I removed the retainclickvalue=1; as you suggested.
As it stands now, if you first click on "Search" in the main_menu, and then click somewhere in the sub menu (it's a type=form, so don't click in the field itself) you will see that the next sub menu will open; it says "..Advanced Search". I would like the "..Advanced search" sub menu to open on rollover.

I tried inserting openonclick=0; at the element level for this sub menu, and its parent menu, but this didn't help.

See lines 475 and 485 below...

And thanks again.

Code:
  1
  2 /*

  3 Milonic DHTML Menu - JavaScript Website Navigation System.
  4 Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
  5 Version 5+ Data File structure is the property of Milonic Solutions Ltd and must only be used in Milonic DHTML Products
  6 This is a commercial software product, please visit http://www.milonic.com/ for more information.
  7 See http://www.milonic.com/license.php for Commercial License Agreement
  8 All Copyright statements must always remain in place in all files at all times
  9 *******  PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE  *******
10 */
11
12 buildAllMenus=1;
13 retainClickValue=0;
14 _menuCloseDelay=500          // The time delay for menus to remain visible on mouse out
15 _menuOpenDelay=500            // The time delay before menus open on mouse over
16 _subOffsetTop=-5              // Sub menu top offset
17 _subOffsetLeft=5            // Sub menu left offset
18
19 // DEFINE any custom functions nex..
20 /*
21 See: http://www.milonic.com/forum/viewtopic.php?p=14348#14348 for a full explanation
22 */
23 function mm_changeItemProperty(menuName, itemName, codeRef, newValue, updateDisplay)
24 {
25   menuName = menuName.toLowerCase();
26   for (i=0; i<_mi.length; i++)
27     if (_mi[i][1].replace(/\&nbsp\;/ig,' ') == itemName && _m[_mi[i][0]][1] == menuName) break;
28   if (i == _mi.length) return;
29   _mi[i][codeRef] = newValue;
30   if (updateDisplay) BDMenu(_mi[i][0]);
31 }
32
33 /*
34 See: http://www.milonic.com/forum/viewtopic.php?t=4853&highlight=type+form for a full explanation
35 */
36 function mm_changeMenuProperty(menuName, propertyRef, newValue)
37 {
38   var menuNum = getMenuByName(menuName);
39   _m[menuNum][propertyRef] = newValue;
40   BDMenu(menuNum);
41 }
42
43
44 // DEFINE the styles used by the various menues & sub menues
45
46 with(TopMainMenuStyle=new mm_style()){
47 openonclick=1;
48 closeonclick=1;
49 onbgcolor="#23243F";
50 oncolor="#ffffff";
51 onborder='0px solid #ffffff';
52 offbgcolor="none";
53 offcolor="#fff";
54 separatorcolor="#2D729D";
55 separatorsize="1";
56 padding=5;
57 fontsize="75%";
58 fontstyle="normal";
59 fontfamily="Verdana, Tahoma, Arial";
60 pagebgimage="images/inverseSubOneNav_bg.png";
61 headercolor="#FBDFB4";
62 headerbgcolor="none";
63 bordercolor="none";
64 }
65
66 with(TopSubTwoHeaderStyle=new mm_style()){
67 openonclick=1;
68 closeonclick=1;
69 fontsize="75%";
70 fontstyle="normal";
71 fontfamily="Verdana, Tahoma, Arial";
72 bgimage="images/trans_BlueGrey.png";
73 align="right";
74 valign="middle";
75 bordercolor="#FFFFFF";
76 borderwidth="1px";
77 borderstyle="solid";
78 padding="2px";
79 }
80
81
82 with(TopPDFsByDepartmentStyle=new mm_style()){
83 openonclick=1;
84 closeonclick=1;
85 onbgcolor="#ccffcc";
86 oncolor="#000000";
87 offbgcolor="#cccccc";
88 offcolor="#99061C";
89 bordercolor="#292B4A";
90 borderstyle="solid";
91 borderwidth=1;
92 padding=5;
93 fontsize="12px";
94 fontstyle="normal";
95 fontweight="normal";
96 fontfamily="Verdana, Tahoma, Arial";
97 headercolor="#FFFFFF";
98 headerbgcolor="#292B4A";
99 imagepadding="0 20 0 10";
100 }
101
102
103 with(AdvancedSearchSubTabStyle=new mm_style()){
104 closeonclick=1;
105 onbgcolor="#ccffcc";
106 oncolor="#000000";
107 offbgcolor="#cccccc";
108 offcolor="#0000CC";
109 bordercolor="#292B4A";
110 borderstyle="solid";
111 borderwidth=1;
112 padding=5;
113 fontsize="12px";
114 fontweight="normal";
115 fontfamily="Verdana, Tahoma, Arial";
116 headercolor="#FFFFFF";
117 headerbgcolor="#292B4A";
118 imagepadding="0 20 0 10";
119 }
120
121
122
123 /* These are variants of the TopMainMenuStyle */
124 TopSubOneMainMenuStyle=new copyOf(TopMainMenuStyle);
125 TopSubOneMainMenuStyle.bgimage="images/trans_BlueGrey.png";
126 TopSubOneMainMenuStyle.pagebgimage="images/inverseSubOneNav_bg.png";
127 TopSubOneMainMenuStyle.pageborder='1px solid #ffffff';;
128 TopSubOneMainMenuStyle.padding=10;
129
130 /* These are variants of the TopMainMenuStyle - One layer down */
131 TopSubTwoMainMenuStyle=new copyOf(TopSubOneMainMenuStyle);
132 TopSubTwoMainMenuStyle.padding=5;
133 TopSubTwoMainMenuStyle.bgimage="images/normalSubTwoNav_bg.gif";
134 TopSubTwoMainMenuStyle.overbgimage="images/overSubTwoNav_bg.gif";
135 TopSubTwoMainMenuStyle.pagebgimage="images/inverseSubTwoNav_bg.gif";
136 TopSubTwoMainMenuStyle.onbgcolor="none";
137 TopSubTwoMainMenuStyle.separatoralign="left";
138 TopSubTwoMainMenuStyle.separatorwidth="221";
139 TopSubTwoMainMenuStyle.pageborder="none";
140 TopSubTwoMainMenuStyle.oncolor="#2847AA";
141
142 /* These are variants of the TopMainMenuStyle - Two layers down */
143 TopSubThreeMainMenuStyle=new copyOf(TopSubOneMainMenuStyle);
144 TopSubThreeMainMenuStyle.openonclick=1;
145 TopSubThreeMainMenuStyle.align="center";
146 TopSubThreeMainMenuStyle.offcolor="#FBDFB4";
147 TopSubThreeMainMenuStyle.offbgcolor="#292B4A";
148 TopSubThreeMainMenuStyle.oncolor="gold";
149 TopSubThreeMainMenuStyle.onbgcolor="#292B4A";
150 TopSubThreeMainMenuStyle.bgimage="none";
151 TopSubThreeMainMenuStyle.bordercolor="#292B4A";
152 TopSubThreeMainMenuStyle.borderstyle="solid";
153 TopSubThreeMainMenuStyle.borderwidth=0;
154 TopSubThreeMainMenuStyle.imagepadding="0 15 0 15";
155
156
157 // "Main Menue" - the items shown in the top navigation bar
158 with(milonic=new menuname("Main Menu")){
159 style=TopMainMenuStyle;
160 top=62;
161 left=300;
162 //itemheight=38;
163 alwaysvisible=1;
164 orientation="horizontal";
165 aI("text=Home;url=#;status=Back To Home Page;");
166 aI("text=Departments;showmenu=TopDepartments;");
167 aI("text=Library;showmenu=TopLibrary;");
168 aI("text=Search;showmenu=TopSearch;");
169 aI("text=My City;showmenu=TopMyCity;");
170 }
171
172 // Sub to "Main Menue" are the five main departments
173 with(milonic=new menuname("TopDepartments")){
174 style=TopSubOneMainMenuStyle;
175 top=92;
176 screenposition="left";
177 left="offset=10";
178 orientation="horizontal";
179 menuwidth=580;
180 aI("openonclick=1;text=City Clerk;showmenu=TopCityClerk;");
181 aI("openonclick=1;text=City Council;showmenu=TopCityCouncil;");
182 aI("openonclick=1;text=Community Development;showmenu=TopCommunityDevelopment;");
183 aI("openonclick=1;text=Police Dept;showmenu=TopPoliceDept;");
184 aI("openonclick=1;text=Finance;showmenu=TopFinance;");
185 }
186
187
188 // Categories belonging to "City Clerk" department
189 with(milonic=new menuname("TopCityClerk")){
190 style=TopSubTwoMainMenuStyle;
191 screenposition="left";
192 left="offset=11";
193 top="131";
194 itemwidth=580;
195 aI("openonclick=1;text=Municipal Code;url=#;");
196 aI("openonclick=1;text=Town Hall Use;url=#;");
197 aI("openonclick=1;text=Consultants & Contractors: <br>&nbsp;&nbsp;City Insurance;url=#;");
198 aI("openonclick=1;text=Requests for Proposals & Bids;url=#;");
199 aI("openonclick=1;text=Encroachments;url=#;");
200 aI("openonclick=1;text=City Elections;url=#;");
201 aI("openonclick=1;text=FPPC & County Website Links;url=#;");
202 }
203
204
205 // Categories belonging to "City Council" department
206 with(milonic=new menuname("TopCityCouncil")){
207 style=TopSubTwoMainMenuStyle;
208 screenposition="left";
209 left="offset=11";
210 top="131";
211 itemwidth=580;
212 aI("openonclick=1;text=Agendas & Minutes;url=#;");
213 aI("openonclick=1;text=Council Members;url=#;");
214 aI("openonclick=1;text=City Council: <br>&nbsp;&nbsp;Calendar of Events;url=#;");
215 aI("openonclick=1;text=How to's;url=#;");
216 aI("openonclick=1;text=FAQ;url=#;");
217 }
218
219
220 // Categories belonging to "Community Development" department
221 with(milonic=new menuname("TopCommunityDevelopment")){
222 style=TopSubTwoMainMenuStyle;
223 screenposition="left";
224 left="offset=11";
225 top="131";
226 itemwidth=580;
227 aI("openonclick=1;text=Planning Commission;url=#;");
228 aI("openonclick=1;text=Public Hearing Notices;url=#;");
229 aI("openonclick=1;text=Land Use & Development;url=#;");
230 aI("openonclick=1;text=Citywide Design Guidelines;url=#;");
231 aI("openonclick=1;text=General Plan;url=#;");
232 aI("openonclick=1;text=Mayor's \"Well Done Award\";url=#;");
233 aI("openonclick=1;text=Planning Permit Brochures;url=#;");
234 aI("openonclick=1;text=Editable Planning Application;url=#;");
235 aI("openonclick=1;text=GP Planning Page;url=#;");
236 aI("openonclick=1;text=FAQ;url=#;");
237 }
238
239
240 // Categories belonging to "Police" department
241 with(milonic=new menuname("TopPoliceDept")){
242 style=TopSubTwoMainMenuStyle;
243 screenposition="left";
244 left="offset=11";
245 top="131";
246 itemwidth=580;
247 aI("openonclick=1;text=Mission Statement;url=#;");
248 aI("openonclick=1;text=Meet the Officers;url=#;");
249 aI("openonclick=1;text=COPPS Projects & Info;url=#;");
250 aI("openonclick=1;text=Code of Ethics;url=#;");
251 aI("openonclick=1;text=PAL Activities<br>&nbsp;&nbsp;and Board Members;url=/default2.html;");
252 aI("openonclick=1;text=Local Missing Persons;url=#;");
253 aI("openonclick=1;text=The Tipster Program;url=#;");
254 aI("openonclick=1;text=The Police Cadets Program;url=#;");
255 aI("openonclick=1;text=Job Opportunities;url=#;");
256 aI("openonclick=1;text=Schedule of Fees;url=#;");
257 aI("openonclick=1;text=Fingerprinting;url=#;");
258 aI("openonclick=1;text=Schedule of Upcomming Events;url=#;");
259 aI("openonclick=1;text=Gang Awareness;url=#;");
260 aI("openonclick=1;text=Graffiti Program;url=#;");
261 aI("openonclick=1;text=Office Hours;url=#;");
262 aI("openonclick=1;text=Frequently Requested Forms;url=#;");
263 aI("openonclick=1;text=Links;url=#;");
264 aI("openonclick=1;text=FAQ;url=#;");
265 }
266
267
268 // Categories belonging to "Finance" department
269 with(milonic=new menuname("TopFinance")){
270 style=TopSubTwoMainMenuStyle;
271 screenposition="left";
272 left="offset=11";
273 top="131";
274 itemwidth=580;
275 aI("openonclick=1;text=City Treasurer;url=#;");
276 aI("openonclick=1;text=Fiscal Responsibilities<br>&nbsp;&nbsp;and Mandates;url=#;");
277 aI("openonclick=1;text=Frequently Requested Forms;url=#;");
278 aI("openonclick=1;text=Documents;url=#;");
279 aI("openonclick=1;text=FAQ;url=#;");
280 }
281
282 /* NEXT: the Documents "Library"  */
283 // Can be dynamically generated from the PDF Searchable DB
284 // Grouped by Department or Category
285 with(milonic=new menuname("TopLibrary")){
286 style=TopSubTwoMainMenuStyle;
287 screenposition="left";
288 left="offset=11";
289 top="91";
290 itemwidth=580;
291 aI("text=Draw from an extensive library of usefull city forms and documents.<br>All in downloadable (PDF) format;type=header;itemheight=38;bgimage=images/trans_BlueGrey.png;onbgcolor=none;pagebgimage=none;headerborder=1px solid #FFFFFF;rawcss=font-variant:small-caps;align=center;margin=10;");
292 aI("openonclick=1;text=Organized<br>&nbsp;&nbsp;by General Category;showmenu=TopPDFsByCategoryOne;");
293 aI("openonclick=1;text=Organized<br>&nbsp;&nbsp;by Department of Origin;showmenu=TopPDFsByDepartment;");
294 aI("openonclick=1;text=Document Search Tool;url=#;");
295 aI("openonclick=1;text=FAQ;url=#;");
296 }
297
298
299 // PDFs by Category#1 - 2B Dynamic byLasso
300 with(milonic=new menuname("TopPDFsByCategoryOne")){
301 style=TopSubThreeMainMenuStyle;
302 top=133;
303 left=232;
304 itemwidth=167;
305 itemheight=40;
306 orientation="horizontal";
307 aI("text=DOCUMENTS;showmenu=TopPDFsByCategoryDocksTwo;fontsize=75%;padding=2;image=images/pdf.gif;imageposition=left;");
308 aI("text=FORMS;showmenu=TopPDFsByCategoryFormsTwo;fontsize=75%;padding=2;image=images/pdf.gif;imageposition=right;");
309 }
310
311 // PDFs by Category Docs#2 - 2B Dynamic byLasso
312 with(milonic=new menuname("TopPDFsByCategoryDocksTwo")){
313 style=TopSubThreeMainMenuStyle;
314 top=173;
315 left=232;
316 itemwidth=147;
317 itemheight=40;
318 orientation="horizontal";
319 aI("text=<font size=-2>by</font><br>Department;align=right;showmenu=TopPDFsByCategoryDocsThreeByDept;fontsize=75%;rawcss=padding-right:15px;");
320 aI("text=<font size=-2>by</font><br>Need;align=left;showmenu=TopPDFsByCategoryDocsThreeByNeed;fontsize=75%;rawcss=padding-left:1px;");
321 }
322
323 // PDFs by Category Forms#2 - 2B Dynamic byLasso
324 with(milonic=new menuname("TopPDFsByCategoryFormsTwo")){
325 style=TopSubThreeMainMenuStyle;
326 top=173;
327 left=232;
328 itemwidth=147;
329 itemheight=40;
330 orientation="horizontal";
331 aI("text=<font size=-2>by</font><br>Department;align=right;showmenu=TopPDFsByCategoryFormsThreeByDept;fontsize=75%;rawcss=padding-right:15px;");
332 aI("text=<font size=-2>by</font><br>Need;align=left;showmenu=TopPDFsByCategoryFormsThreeByNeed;fontsize=75%;rawcss=padding-left:1px;");
333 }
334
335 // PDFs by Category Docs#3 byDept - 2B Dynamic byLasso
336 with(milonic=new menuname("TopPDFsByCategoryDocsThreeByDept")){
337 style=TopPDFsByDepartmentStyle;
338 top=213;
339 left=232;
340 itemwidth=333;
341 overflow="scroll";
342 aI("type=header;text=<font color=gold>City Clerk</font>;rawcss=font-variant:small-caps;align=center;");
343 aI("text=Town Hall Use;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
344 aI("text=City Insurance Requirements;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
345
346 aI("type=header;text=<font color=gold>City Council</font>;rawcss=font-variant:small-caps;align=center;");
347 aI("text=City Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
348 aI("text=City Council Minutes (most recent);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
349 aI("text=City Council Minutes (archived);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
350 aI("text=How to put an item on the Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
351 aI("text=CDC Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
352 aI("text=F & A Commitee Agendas and Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
353 aI("text=Public Safety Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
354 aI("text=Public Works Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
355 aI("text=CDAB Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
356
357 aI("type=header;text=<font color=gold>Police Department</font>;rawcss=font-variant:small-caps;align=center;");
358 aI("text=Press Releases;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
359 aI("text=CHP 555 short;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
360 aI("text=Info Only Report;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
361 }
362
363 // PDFs by Category Docs#3 byNeed - 2B Dynamic byLasso
364 with(milonic=new menuname("TopPDFsByCategoryDocsThreeByNeed")){
365 style=TopPDFsByDepartmentStyle;
366 top=213;
367 left=232;
368 itemwidth=333;
369 overflow="scroll";
370 aI("type=header;text=<font color=gold>Proceedures & Policies</font>;rawcss=font-variant:small-caps;align=center;");
371 aI("text=Town Hall Use;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
372 aI("text=City Insurance Requirements;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
373 aI("text=How to put an item on the Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
374
375 aI("type=header;text=<font color=gold>Agendas, Minutes & Public Records</font>;rawcss=font-variant:small-caps;align=center;");
376 aI("text=City Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
377 aI("text=City Council Minutes (most recent);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
378 aI("text=City Council Minutes (archived);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
379 aI("text=CDC Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
380 aI("text=F & A Commitee Agendas and Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
381 aI("text=Public Safety Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
382 aI("text=Public Works Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
383 aI("text=CDAB Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
384 aI("text=Press Releases;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
385
386 aI("type=header;text=<font color=gold>Miscellaneous</font>;rawcss=font-variant:small-caps;align=center;");
387 aI("text=CHP 555 short;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
388 aI("text=Police Info Only Report;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
389 }
390
391 // PDFs by Category Forms#3 byDept - 2B Dynamic byLasso
392 with(milonic=new menuname("TopPDFsByCategoryFormsThreeByDept")){
393 style=TopPDFsByDepartmentStyle;
394 top=213;
395 left=232;
396 itemwidth=333;
397 overflow="scroll";
398 aI("type=header;text=<font color=gold>City Clerk</font>;rawcss=font-variant:small-caps;align=center;");
399 aI("text=Public Records Request;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
400 aI("text=Encroachment Permit Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
401
402 aI("type=header;text=<font color=gold>City Council</font>;rawcss=font-variant:small-caps;align=center;");
403 aI("text=Speaker Card Forms;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
404
405 aI("type=header;text=<font color=gold>Police Department</font>;rawcss=font-variant:small-caps;align=center;");
406 aI("text=Cadet Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
407 aI("text=Job Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
408 aI("text=Parking Ticket Appeal;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
409 }
410
411 // PDFs by Category Forms#3 byNeed - 2B Dynamic byLasso
412 with(milonic=new menuname("TopPDFsByCategoryFormsThreeByNeed")){
413 style=TopPDFsByDepartmentStyle;
414 top=213;
415 left=232;
416 itemwidth=333;
417 overflow="scroll";
418 aI("type=header;text=<font color=gold>Permits & Applications</font>;rawcss=font-variant:small-caps;align=center;");
419 aI("text=Encroachment Permit Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
420 aI("text=Cadet Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
421 aI("text=Job Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
422
423 aI("type=header;text=<font color=gold>Request & Appeal Forms</font>;rawcss=font-variant:small-caps;align=center;");
424 aI("text=Public Records Request;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
425 aI("text=Parking Ticket Appeal;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
426
427 aI("type=header;text=<font color=gold>Miscellaneous</font>;rawcss=font-variant:small-caps;align=center;");
428 aI("text=Speaker Card Forms;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
429 }
430
431
432
433 // PDFs by Department - 2B Dynamic byLasso
434 with(milonic=new menuname("TopPDFsByDepartment")){
435 style=TopPDFsByDepartmentStyle;
436 top=133;
437 left=232;
438 itemwidth=340;
439 overflow="scroll";
440 aI("type=header;text=from the <font color=gold>&nbsp; City Clerk</font>;image=images/pdf.gif;rawcss=font-variant:small-caps;");
441 aI("text=Public Records Request;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
442 aI("text=Town Hall Use;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
443 aI("text=City Insurance Requirements;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
444 aI("text=Encroachment Permit Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
445
446 aI("type=header;text=from the <font color=gold>&nbsp; City Council</font>;image=images/pdf.gif;rawcss=font-variant:small-caps;");
447 aI("text=City Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
448 aI("text=City Council Minutes (most recent);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
449 aI("text=City Council Minutes (archived);url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
450 aI("text=Speaker Card Forms;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
451 aI("text=How to put an item on the Council Agenda;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
452 aI("text=CDC Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
453 aI("text=F & A Commitee Agendas and Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
454 aI("text=Public Safety Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
455 aI("text=Public Works Commitee Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
456 aI("text=CDAB Agendas & Minutes;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
457
458 aI("type=header;text=from the <font color=gold>&nbsp; Police Department</font>;image=images/pdf.gif;rawcss=font-variant:small-caps;");
459 aI("text=Cadet Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
460 aI("text=Job Application;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
461 aI("text=Press Releases;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
462 aI("text=CHP 555 short;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
463 aI("text=Info Only Report;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
464 aI("text=Parking Ticket Appeal;url=#;fontsize=75%;padding=2;image=images/blank10x10.gif;");
465 }
466
467
468 // Simple search
469 with(milonic=new menuname("TopSearch")){
470 style=TopSubTwoHeaderStyle;
471 screenposition="left";
472 left="offset=10";
473 top="91";
474 itemwidth=579;
475 aI("openonclick=0;type=form;rawcss=font-variant:small-caps;showmenu=AdvancedSearch;text=<form name=form1 action=#><font color=#FBDFB4>Do a simple search of this site... </font><input style=background-color:#EBE689 type=text name=simplesearch> <input type=submit value=search></form>;");
476 }
477
478 // Sub search (advanced) tab
479 with(milonic=new menuname("AdvancedSearch")){
480 style=AdvancedSearchSubTabStyle;
481 screenposition="left";
482 left="offset=11";
483 top="131";
484 itemwidth=577;
485 aI("openonclick=0;text=<font size=-2>Alternately, try an</font> <u><font style=font-variant:small-caps>Advanced Search</font></u>;align=right;");
486 }
487
488
489 // Example, using TopMyCity of form when "type=header"
490 with(milonic=new menuname("TopMyCity")){
491 style=TopSubTwoHeaderStyle;
492 screenposition="left";
493 left="offset=10";
494 top="91";
495 itemwidth=577;
496 //aI("type=header;rawcss=font-variant:small-caps;text=<form name=form2 action=http://pdaoutlet.biz/cgi-bin/mail.cgi><input type=hidden name=flavor value=subscribe><input type=hidden name=list value=pda><font color=#FBDFB4>Our Newsletter... </font><input style=background-color:#EBE689 type=text name=email> <input type=submit value=Subscribe></form>;");
497 }
498
499 drawMenus();


Poster: Ruth
Dated: Friday December 31 2004 - 2:55:25 GMT

When clicked Search opens the submenu TopSearch. You want that submenu to open another submenu called AdvancedSearch when the aI string calling it is mouseOver. To do that you put the retainClickValue="true"; into the definition of the TopSearch submenu. I suggest you create a second aI string to call that menu:


Code:
// Simple search
with(milonic=new menuname("TopSearch")){
style=TopSubTwoHeaderStyle;
retainClickValue="true";
screenposition="left";
left="offset=10";
top="91";
itemwidth=579;
aI("type=form;rawcss=font-variant:small-caps;text=<form name=form1 action=#><font color=#FBDFB4>Do a simple search of this site... </font><input style=background-color:#EBE689 type=text name=simplesearch> <input type=submit value=search></form>;");
aI("text=Alternately, try an <small>ADVANCED SEARCH</small>;fontsize=9px;align=right;showmenu=AdvancedSearch;");

}

// Sub search (advanced) tab
with(milonic=new menuname("AdvancedSearch")){
style=AdvancedSearchSubTabStyle;
top="offset=25";
itemwidth=577;
aI("text=The Advanced Search Form or whatever you're using for advanced search will open here. The coding for the top offset in this menu is to get this to open below the form  and the aI string that says Alternatively try an advanced search above this.;align=right;");
}


I am getting an error in IE5.5 I have no idea what it is since it doesn't tell me so I can't even guess. But it lets the script run anyway and it works just fine in Netscape, Opera, Firebird.

Ruth

So, doe this mean I can only have it one way or the other?


Poster: Maestro
Dated: Friday December 31 2004 - 9:00:52 GMT

First..
Tim wrote:
There are some occasions when I WANT a sub menu to open when its parent menu is rolled over.



Then..
Ruth wrote:
You have retainClickValue=1; if I understand correctly this means that it makes the menu function as most desktop application which have a click to open the first menu and then the rest open on mouseover. Eliminate that and the menus open on click.


it certainly did Ollie.
..after taking your advise..
But, then Tim wrote:
There are some occasions when I WANT a sub menu to open when its parent menu is rolled over.

(Is this guy NEVER happy?)


So Ruth wrote:
When clicked Search opens the submenu TopSearch. You want that submenu to open another submenu called AdvancedSearch when the aI string calling it is mouseOver. To do that you put the retainClickValue="true"; into the definition of the TopSearch submenu. I suggest you create a second aI string to call that menu


And that worked!
..taking us right back to where we started (sorry) :?
Everything rolls over again.

Which teaches us that:
    a. When retainclickvalue="true"; it works EXCLUSEVLY - that is, overridingly.
    b. When retainclickvalue="false"; and openonclick="true"; and is inserted at the element level (perhaps very redundantly), it to works EXCLUSEVLY.
    c. But there is not (it seems) a simple way to use both, together.


However, I found the compromise which does seem to work, and is based entirely on your last good suggestion.


Code:
// Simple search
with(milonic=new menuname("TopSearch")){
style=TopSubTwoHeaderStyle;
//retainClickValue="true";
screenposition="left";
left="offset=10";
top="91";
itemwidth=579;
aI("type=form;rawcss=font-variant:small-caps;text=<form name=form1 action=#><font color=#FBDFB4>Do a simple search of this site... </font><input style=background-color:#EBE689 type=text name=simplesearch> <input type=submit value=search></form>;");
aI("text=Alternately, try an <small>ADVANCED SEARCH</small>;fontsize=9px;align=right;showmenu=AdvancedSearch;");
}

// Sub search (advanced) tab
with(milonic=new menuname("AdvancedSearch")){
style=AdvancedSearchSubTabStyle;
top="offset=25";
itemwidth=577;
aI("text=The Advanced Search Form or whatever you're using for advanced search will open here. The coding for the top offset in this menu is to get this to open below the form  and the aI string that says Alternatively try an advanced search above this.;align=right;");
}


Thank you, thank you, thank you!
I was making things too hard.
A 2nd element 8O in "TopSearch", which evokes an "AdvancedSearch" sub menu, bypasses the whole problem.

Making this little problem one for the "feature request" bin. ;)

-Tim