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

Change dynamically the style or something else on a menu ...


Poster: fpajot
Dated: Thursday October 16 2003 - 10:43:40 BST

Hello,

I want to dynamically change the style of a menu.
Example :
The menu is charged with the StdStyle1 style (red background and white font)
If the user makes an action on the page, the style of the menu changes into StdStyle2 (white background, black font).

Is it possible, and How ?

Thanks

PS : Sorry for my bad english ...


Poster: Hergio
Dated: Thursday October 16 2003 - 16:21:44 BST

Well you could do it one of two ways. You can use CSS and change the CSS classes your menu's use based on some event so then your menu's would pick up on the change and look different.

Or are you referring to being able to change the 'MENU STYLE' of a menu. Like, you've defined two menu styles in the menu_data file, with a menu using one to start and based on some event, you want it to use a different menu style.

Which type of change are you looking for?


Poster: fpajot
Dated: Friday October 17 2003 - 9:21:49 BST

I want to use the menus like mitres.

I have two styles:
style1: Mitre OFF
style2: Mitre ON

and 3 menus.

The page is load like this :
Menu1 --> style2
Menu2 --> style1
Menu3 --> style1

When the user clicks on Menu2 (or Menu3), this menu takes dynamically the style "Style2" (ON) and the Menu1 takes the Style1 (OFF).

Are my explanations clear?


Poster: Hergio
Dated: Friday October 17 2003 - 15:57:10 BST

But my question is are style1 and style2 milonic menu styles? As in would style1 or style2 be in your code as ...
Code:
with(style1=new mm_style()){
onbgcolor="#C1D2EE";
oncolor="#000000";
offbgcolor="#ECF6FF";
offcolor="#000000";
bordercolor="#8A867A";
borderstyle="solid";
borderwidth=0;
offborder="1px solid #cccccc";
onborder="1px solid #316AC5";
padding=1;
fontsize="11px";
fontstyle="normal";
fontweight="bold";
fontfamily="Tahoma, Verdana, Arial";
separatorsize=1;
separatorpadding=5;
separatorcolor="#555555";
pagecolor="#316AC5";
}


Poster: fpajot
Dated: Friday October 17 2003 - 16:03:12 BST

Yes of course, it's two milonic menu styles.

Like http://www.milonic.co.uk/menusample.php?sampleid=10, I want to change dynamically the style of a milonic menu !