Menu Item Text Color changing once visited

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
wpfeiffe
Beginner
Beginner
Posts: 3
Joined: Thu Feb 27, 2003 7:23 pm

Menu Item Text Color changing once visited

Post by wpfeiffe »

Is there a property that can be turned on or off that will prevent currently visited menu item text from changing color. I have the menu style in a javascript file and am writing out the menu data via a JSP tag that looks at our security model. The menu is being built fine and is displayed correctly but once menu items are selected the text color changes to black. Here are the style definitions:


_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=250 // The time delay before menus open on mouse over
_subOffsetTop=0 // Sub menu top offset
_subOffsetLeft=0 // Sub menu left offset

with(AFRootStyle=new mm_style())
{
offcolor="white";
offbgcolor="#006633";
oncolor="black";
onbgcolor="#99cc99";
bordercolor="#000000";
fontsize="11";
fontstyle="normal";
fontweight="bold";
fontfamily="sans-serif,Arial";
padding=5;
subimage="../../resources/images/mm_arrowdn.gif";
separatorcolor="black";
separatorsize="1";
headercolor="#ffffff";
headerbgcolor="#000099";
subimagepadding="5";
overfilter="Fade(duration=0.5);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
borderstyle="solid";
borderwidth=1;
pagecolor="black";
openonclick="true";
}

with(AFMainStyle=new mm_style())
{
offcolor="white";
offbgcolor="#006633";
oncolor="black";
onbgcolor="#99cc99";
bordercolor="#000000";
fontsize="11";
fontstyle="normal";
fontweight="bold";
fontfamily="sans-serif,Arial";
padding=5;
subimage="../../resources/images/mm_arrow.gif";
separatorcolor="black";
separatorsize="1";
headercolor="#ffffff";
headerbgcolor="#000099";
subimagepadding="5";
overfilter="Fade(duration=0.5);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
borderstyle="solid";
borderwidth=1;
pagecolor="black";
openonclick="true";
}

Any help is greatly appreciated.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

The color changes to black because you told it to!

Code: Select all

oncolor="black";
Possibly some reading would be in order - http://milonic.com/forum/viewtopic.php?t=2981. :)
John
wpfeiffe
Beginner
Beginner
Posts: 3
Joined: Thu Feb 27, 2003 7:23 pm

Post by wpfeiffe »

The text color changing to black is fine when the user is mousing over the item to select it. The problem is that the style never changes back to the off color. From the moment the item is selected the text color changes to black and is not changing back to white. If I take onColor out of the menu style, won't the rollover effect go away?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Do you have a style sheet? Do you have a:visited color set or something in the a: link set?

Ruth
wpfeiffe
Beginner
Beginner
Posts: 3
Joined: Thu Feb 27, 2003 7:23 pm

Post by wpfeiffe »

Yes. There is a a:link and a:visited style. What should we do to prevent this from interferring with the menu? Do we need to take these out all together?

Thanks for the helpful response.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

What I did on my pages was to eliminate all but the a:hover and a:active. That gave me what I wanted on the page but stopped doing the visited link color change in the menu. I'm not sure if there's a way to set the a:visited so it doesn't affect the menu since the menu reads the css. I'll try some things and see if any work.

Ruth
Post Reply