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

header color does not change back after mouse roll over


Poster: akinss
Dated: Wednesday July 13 2005 - 17:44:49 BST

I'm having trouble trying to get text in a header to return to it previous color after a mouse roll over.

The oncolor seems to be activated but when you mouse off the offcolor isn't used.

It looks like there should be a headeroncolor and a headeroffcolor.


Below is an example of what I'm trying to describe. Menu1 and Menu2 both initially have a text color of #000000 when you mouse on to these the color changes to #990000 but when you mouse off they stay as #990000.

I would really like to know how you can get these headers to go from #000000 to #990000 and then back to #000000

Thanks in advance.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html lang="en"><HEAD></HEAD>
<body >
<script type="text/javascript" src="scripts/mm/milonic_src.js"></script>
<script type="text/javascript">
if(ns4) _d.write("<script type=text/javascript src='scripts/mm/mmenuns4.js'><\/script>");
else _d.write("<script type=text/javascript src='scripts/mm/mmenudom.js'><\/script>");
</script>
<script type="text/javascript" src="scripts/mm/mmpagehighlighter.js"></script>
<script type="text/javascript" src="scripts/mm/mm_menueditapi.js"></script>
<script type="text/javascript">
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;

with(headerStyle=new mm_style()){
bordercolor="#000000";
borderstyle="none";
borderwidth=1;

fontfamily="Arial, Helvetica, sans-serif";
fontsize="12px";
fontstyle="normal";
fontweight="normal";

headerbgcolor="#CEDAE8";
headercolor="#000000";

offbgcolor="#9DB5D1";
onbgcolor="#CEDAE8";

offcolor="#000000";
oncolor="#990000";

separatorcolor="#FFFFFF";
separatorsize=1;
subimagepadding=1;
itemwidth=145;
itemheight=23;
padding=5;
}

with(subItemMenuStyle=new mm_style()){
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=1;

fontfamily="Arial, Helvetica, sans-serif";
fontsize="12px";
fontstyle="normal";
fontweight="normal";

offbgcolor="#9DB5D1";
onbgcolor="#CEDAE8";

offcolor="#000000";
oncolor="#990000";

separatorcolor="#FFFFFF";
separatorsize=1;
subimagepadding=1;
itemwidth=150;
itemheight=23;
padding=4;
}

with(milonic=new menuname("Main Menu")){alwaysvisible=1;left=8;top=93;style=headerStyle;
aI("showmenu=0;text=Menu0;title=Menu0;url=#;type=header;");
aI("text=Menu1;title=Menu1;url=#;type=header;");
aI("text=Sub1;title=Sub1;url=#;");
aI("text=Sub2;title=Sub2;url=#;");
}

with(milonic=new menuname('0')){style=subItemMenuStyle;
aI("text=Sub1;title=Sub1;url=#");
aI("text=Sub2;title=Sub2;url=#");
}
</script>
<script type="text/javascript">drawMenus();</script>
<script type="text/javascript" src="scripts/mm/keypress.js"></script>
</body>
</html>


Poster: Ruth
Dated: Wednesday July 13 2005 - 19:19:35 BST

I'm not sure I understand. If you are using type=header, it should only have the one color headerbgcolor= and headercolor=. I notice that you are using type=header but you are including a url. Could you say what you are trying to do?

If you are trying to make the two items I see have a different offbgcolor, offcolor, then instead of using that type=header to pick the different colors just put the different colors in the aI string.

Code:
aI("showmenu=0;text=Menu0;title=Menu0;url=#;offbgcolor=#CEDAE8;offcolor=#000000;");
aI("text=Menu1;title=Menu1;url=#;offbgcolor=#CEDAE8;offcolor=#000000;");
Doing that will mean that the visible offbgcolor and offcolor on those items would be the colors you now have set for the header and when you mouseover them the onbgcolor and oncolor would be the ones listed in the style.

If that is not what you are trying to do could you tell us what that is?

Ruth