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

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
fpajot
Advanced
Advanced
Posts: 14
Joined: Thu Nov 07, 2002 4:10 pm

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

Post by fpajot »

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 ...
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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?
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
fpajot
Advanced
Advanced
Posts: 14
Joined: Thu Nov 07, 2002 4:10 pm

Post by fpajot »

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?
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

But my question is are style1 and style2 milonic menu styles? As in would style1 or style2 be in your code as ...

Code: Select all

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";
}
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
fpajot
Advanced
Advanced
Posts: 14
Joined: Thu Nov 07, 2002 4:10 pm

Post by fpajot »

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 !
Post Reply