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

Default URL and submenu to open when clicking main-menu item


Poster: pmerlyn
Dated: Tuesday January 31 2006 - 0:08:59 GMT

Hello Milonic Support Team

Please help. I can't find the answer in the FAQ list or other support documention.

When a user clicks on a main-menu item, I want two things to happen:
(1) a submenu to open for that main-menu item
(2) a page URL to load.

On my site (which uses the bolt-on module openmenusbyurl.js) at the moment, only part (1) is happening.

To see what I mean, please visit http://www.newresolution.org/d_children.shtml
Next, click on the 'Resources' main-menu item.
You should see a submenu appear with five items (Online Self-Help, Books, Articles, Professional Associations, and Search).

This is fine in as far as it goes, except I want in addition is for the URL /r_onlinehelp.shtml page to open as soon as someone clicks (or better yet, mouses over) the 'Resources' main-menu item. In other words, I'm trying to make one of the submenu item's corresponding URL to open by default as soon as the user clicks on (or mouses over) the parent item in the main menu.

I hope that makes sense.

I've pasted my menu source file to help illuminate whatever I'm doing wrong. Thank you for your help.

Paul

_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;


forgetClickValue="true";


with(menuStyle=new mm_style()){
bgimage="images/tab_on_charcoal.jpg";
fontfamily="Verdana, Tahoma, Arial";
fontsize="65%";
fontstyle="normal";
fontweight="bold";
itemheight=26;
itemwidth=79;
offcolor="#FFFFFF";
oncolor="#FF9900";
openonclick=1;
subimagepadding=2;
separatorimage="images/tab_white_sep.gif";
separatorsize=1;
clickbgimage="images/tab_on_tang.jpg";
}

with(submenuStyle=new mm_style()){
styleid=1;
align="left";
menubgimage="images/tangmenubg.jpg";
fontfamily="Verdana, Tahoma, Arial";
fontsize="65%";
fontstyle="normal";
fontweight="bold";
itemheight=19;
//offbgcolor="#FF9900";
offcolor="#444444";
oncolor="#000000";
ondecoration="none";
openonclick=1;
padding=6;
separatorimage="images/tab_top_vert_black.gif";
separatorsize=3;
overfilter='Fade(duration=0.2);Shadow(color="#333333",Direction=180,Strength=3)';
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
openstyle="tab";
orientation="horizontal";
screenposition="left";
style=menuStyle;
top=102;
aI("align=center;keepalive=1;showmenu=MainMenu1;text=Mediation;");
aI("align=center;keepalive=1;showmenu=MainMenu2;text=Litigation;");
aI("align=center;keepalive=1;showmenu=MainMenu3;text=Divorce;");
aI("align=center;keepalive=1;showmenu=MainMenu4;text=Services;");
aI("align=center;keepalive=1;showmenu=MainMenu5;text=Resources;");
aI("align=center;itemwidth=80;keepalive=1;showmenu=MainMenu6;text=Contact;");
}

with(milonic=new menuname("MainMenu1")){
menualign="left";
menuwidth="750px";
orientation="horizontal";
screenposition="left";
style=submenuStyle;
aI("text=Mediation;url=m_mediation.shtml;");
aI("text=Benefits;url=m_benefits.shtml;");
aI("text=Common Questions;url=m_questions.shtml;");
aI("text=Mediators, Attorneys & Therapists;url=m_mat.shtml;");
aI("text=Preparing for Mediation;url=m_preparation.shtml;");
aI("separatorsize=4;");
}

with(milonic=new menuname("MainMenu2")){
menualign="left";
menuwidth="750px";
orientation="horizontal";
screenposition="left";
style=submenuStyle;
aI("text=Litigation;url=l_litigation.shtml;");
aI("text=Vindication;url=l_vindication.shtml;");
aI("text=Costs of Litigation;url=l_costs.shtml;");
aI("text=Empowerment;url=l_empowerment.shtml;");
aI("separatorsize=4;");
}

with(milonic=new menuname("MainMenu3")){
menualign="left";
menuwidth="750px";
orientation="horizontal";
screenposition="left";
style=submenuStyle;
aI("text=Divorce;url=d_divorce.shtml;");
aI("text=Marital Settlement Agreement;url=d_msa.shtml;");
aI("text=Divorce & Separation;url=d_divandsep.shtml;");
aI("text=Support;url=d_support.shtml;");
aI("text=Children;url=d_children.shtml;");
aI("text=Property;url=d_property.shtml;");
aI("text=Tax;url=d_tax.shtml;");
aI("separatorsize=4;");
}

with(milonic=new menuname("MainMenu4")){
menualign="left";
menuwidth="750px";
orientation="horizontal";
screenposition="left";
style=submenuStyle;
aI("text=Services;url=s_mediation.shtml;");
aI("text=Dispute Types;url=s_disputes.shtml;");
aI("text=Our Mediators;url=s_mediators.shtml;");
aI("text=Common Questions;url=s_questions.shtml;");
aI("text=Fees;url=s_fees.shtml;");
aI("text=Agreement to Mediate;url=s_agreement.shtml;");
aI("text=Standards of Practice;url=s_standards.shtml;");
aI("separatorsize=4;");
}

with(milonic=new menuname("MainMenu5")){
menualign="left";
menuwidth="750px";
orientation="horizontal";
screenposition="left";
style=submenuStyle;
aI("text=Online Self-Help;url=r_onlinehelp.shtml;");
aI("text=Books;url=r_books.shtml;");
aI("text=Articles;url=r_articles.shtml;");
aI("text=Professional Associations;url=r_profassocs.shtml;");
aI("text=Search;url=r_search.shtml;");
aI("separatorsize=4;");
}
with(milonic=new menuname("MainMenu6")){
menualign="left";
menuwidth="750px";
orientation="horizontal";
screenposition="left";
style=submenuStyle;
aI("text=Contact Us;url=c_contact.shtml;");
aI("text=Request Consultation;url=consultreqform.shtml;");
aI("text=Request to Contact Other Party;url=otherpartyrequestform.shtml;");
aI("separatorsize=4;");
}
drawMenus();


Poster: Ruth
Dated: Tuesday January 31 2006 - 15:59:12 GMT

If you want them to go to that page when you click to open that submenu you need to add the url property to the aI.

Code:
aI("align=center;keepalive=1;showmenu=MainMenu5;text=Resources;url=r_onlinehelp.shtml;");


It won't open on mouseover since you have the menu set to openonclick.

Ruth

Thank You!


Poster: pmerlyn
Dated: Tuesday January 31 2006 - 17:30:33 GMT

Thank you very much, Ruth, for helping me with both issues - the rollover and the default opening of URLs. Very logical - I just got myself lost.

Milonic provides a wonderful menu solution for two reasons: (1) the technology is great, and (2) the support is magnificent. I'm so glad I "stumbled" upon you guys!

Best wishes,

Paul