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:35
images in top-level menu refreshed when you mouse onto sub
Poster: Doubledown
Dated: Friday March 26 2004 - 0:00:57 GMT
I'm wondering if anyone has run into this: I'm using images with rollovers in my top level menu. When I try mousing over onto the subs, it's like the top-level menu image refreshes and rolls over again. It is very apparent with mine, because my rollover is an animated gif. Take a look: http://www.telusplanet.net/public/tmotz/lcsr/topmenu/sample.html
Also, here is the code for the menu_data.js file:
Code:
_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=0 // Sub menu top offset
_subOffsetLeft=0 // Sub menu left offset
with(Mainmenu=new mm_style()){
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="#DCE9F0";
offcolor="#515151";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=0;
separatorcolor="#FFFFFF";
separatorsize="0";
padding=0;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimagepadding="0";
}
with(Submenu=new mm_style()){
oncolor="#C75100";
offcolor="#000000";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=2;
separatorcolor="#FFFFFF";
separatorsize="2";
padding=3;
fontsize="8pt";
fontstyle="normal";
fontweight="normal";
fontfamily="Arial, Helvetica";
menubgimage="bg.gif";
overfilter="gradientwipe(wipestyle=1, motion=Forward, duration=0.5);Alpha(opacity=100);";
outfilter="gradientwipe(wipestyle=1, motion=Reverse, duration=0.5)";
}
with(milonic=new menuname("Main Menu")){
style=Mainmenu;
top=8;
left=324;
alwaysvisible=1;
orientation="horizontal";
aI("showmenu=PracticeAreas;image=topnav_practiceareas1.gif;overimage=topnav_practiceareas2.gif;");
aI("showmenu=Firm;image=topnav_firm1.gif;overimage=topnav_firm2.gif;");
aI("showmenu=Attorneys;image=topnav_attorneys1.gif;overimage=topnav_attorneys2.gif;");
aI("showmenu=Offices;image=topnav_offices1.gif;overimage=topnav_offices2.gif;");
aI("url=##;image=topnav_contact1.gif;overimage=topnav_contact2.gif;");
aI("url=##;image=topnav_home1.gif;overimage=topnav_home2.gif;");
}
with(milonic=new menuname("PracticeAreas")){
style=Submenu;
aI("text=Overview;url=##;image=subspacer.gif;");
aI("text=Securities;url=##;image=subspacer.gif;");
aI("text=Insurance;url=##;image=subspacer.gif;");
aI("text=Antitrust;url=##;image=subspacer.gif;");
aI("text=Consumers;url=##;image=subspacer.gif;");
}
with(milonic=new menuname("Firm")){
style=Submenu;
aI("text=Overview;url=##;image=subspacer.gif;");
aI("text=Current Cases;url=##;image=subspacer.gif;");
aI("text=Settled Cases;url=##;image=subspacer.gif;");
aI("text=Featured Cases;url=##;image=subspacer.gif;");
aI("text=Careers;url=##;image=subspacer.gif;");
aI("text=Newsroom;url=##;image=subspacer.gif;");
aI("text=Q & A;url=##;image=subspacer.gif;");
}
with(milonic=new menuname("Attorneys")){
style=Submenu;
aI("text=Overview;url=##;image=subspacer.gif;");
aI("text=Partners;url=##;image=subspacer.gif;");
aI("text=Associates;url=##;image=subspacer.gif;");
aI("text=of Counsel;url=##;image=subspacer.gif;");
aI("text=Special Counsel;url=##;image=subspacer.gif;");
}
with(milonic=new menuname("Offices")){
style=Submenu;
aI("text=San Diego;url=##;;image=subspacer.gif;");
aI("text=San Francisco;url=##;;image=subspacer.gif;");
aI("text=Los Angeles;url=##;;image=subspacer.gif;");
aI("text=Washington D.C.;url=##;;image=subspacer.gif;");
aI("text=Philadelphia;url=##;;image=subspacer.gif;");
}
drawMenus();
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=0 // Sub menu top offset
_subOffsetLeft=0 // Sub menu left offset
with(Mainmenu=new mm_style()){
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="#DCE9F0";
offcolor="#515151";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=0;
separatorcolor="#FFFFFF";
separatorsize="0";
padding=0;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimagepadding="0";
}
with(Submenu=new mm_style()){
oncolor="#C75100";
offcolor="#000000";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=2;
separatorcolor="#FFFFFF";
separatorsize="2";
padding=3;
fontsize="8pt";
fontstyle="normal";
fontweight="normal";
fontfamily="Arial, Helvetica";
menubgimage="bg.gif";
overfilter="gradientwipe(wipestyle=1, motion=Forward, duration=0.5);Alpha(opacity=100);";
outfilter="gradientwipe(wipestyle=1, motion=Reverse, duration=0.5)";
}
with(milonic=new menuname("Main Menu")){
style=Mainmenu;
top=8;
left=324;
alwaysvisible=1;
orientation="horizontal";
aI("showmenu=PracticeAreas;image=topnav_practiceareas1.gif;overimage=topnav_practiceareas2.gif;");
aI("showmenu=Firm;image=topnav_firm1.gif;overimage=topnav_firm2.gif;");
aI("showmenu=Attorneys;image=topnav_attorneys1.gif;overimage=topnav_attorneys2.gif;");
aI("showmenu=Offices;image=topnav_offices1.gif;overimage=topnav_offices2.gif;");
aI("url=##;image=topnav_contact1.gif;overimage=topnav_contact2.gif;");
aI("url=##;image=topnav_home1.gif;overimage=topnav_home2.gif;");
}
with(milonic=new menuname("PracticeAreas")){
style=Submenu;
aI("text=Overview;url=##;image=subspacer.gif;");
aI("text=Securities;url=##;image=subspacer.gif;");
aI("text=Insurance;url=##;image=subspacer.gif;");
aI("text=Antitrust;url=##;image=subspacer.gif;");
aI("text=Consumers;url=##;image=subspacer.gif;");
}
with(milonic=new menuname("Firm")){
style=Submenu;
aI("text=Overview;url=##;image=subspacer.gif;");
aI("text=Current Cases;url=##;image=subspacer.gif;");
aI("text=Settled Cases;url=##;image=subspacer.gif;");
aI("text=Featured Cases;url=##;image=subspacer.gif;");
aI("text=Careers;url=##;image=subspacer.gif;");
aI("text=Newsroom;url=##;image=subspacer.gif;");
aI("text=Q & A;url=##;image=subspacer.gif;");
}
with(milonic=new menuname("Attorneys")){
style=Submenu;
aI("text=Overview;url=##;image=subspacer.gif;");
aI("text=Partners;url=##;image=subspacer.gif;");
aI("text=Associates;url=##;image=subspacer.gif;");
aI("text=of Counsel;url=##;image=subspacer.gif;");
aI("text=Special Counsel;url=##;image=subspacer.gif;");
}
with(milonic=new menuname("Offices")){
style=Submenu;
aI("text=San Diego;url=##;;image=subspacer.gif;");
aI("text=San Francisco;url=##;;image=subspacer.gif;");
aI("text=Los Angeles;url=##;;image=subspacer.gif;");
aI("text=Washington D.C.;url=##;;image=subspacer.gif;");
aI("text=Philadelphia;url=##;;image=subspacer.gif;");
}
drawMenus();
Thanks for any help you can provide!!
Poster: kevin3442
Dated: Friday March 26 2004 - 0:55:28 GMT
Yes, I have noticed that before. You'll also note, if you move the pointer slowly, that the pointer reverts to the default (arrow) in a small space before you hit the first item in the submenu... as though it's briefly left the menu altogether. When you get the hand pointer again, the rollover fires again. I have also recently noticed the same effect with onfunction... the main menu item's onfunction will fire again when you mouse off of it and into the submenu. I have not, however, gotten around to reporting that yet. And unfortunately, I don't know a workaround. You might try setting a negative vertical offset in the submenus that branch from main (i.e., in the submenu definition, set top="offset=-2" or so). That would move the submenu up, closing the gap (if any) between it and the main menu. Haven't tried it myself, but it's worth a shot.
Sorry I can't be more help. Maybe Andy will see this and look into it.
Kevin
Poster: Doubledown
Dated: Friday March 26 2004 - 19:31:02 GMT
Thanks for the input. Unfortunately, setting a negative vertical offset didn't help. But I discovered that what makes it so obvious is the animated rollover. When I changed it to a non-animated rollover, it was practically impossible to notice. Thanks again.
Poster: Ruth
Dated: Saturday March 27 2004 - 4:41:02 GMT
I was wondering if perhaps it was the animation setting? What about if you set it to only play once? That would lose it replaying if they moused over an item again, but it might stop it from playing as you went from main to submenu. Though to be honest, I kind of liked the double run, really caught your eye.
Ruth
Poster: kevin3442
Dated: Saturday March 27 2004 - 5:04:39 GMT
I could be wrong, but I have the impression that the animation was set to play only once, but it fired again when you moused into the submenus. In any case... I agree... I liked the animation effect, especially when traversing the main menu. I liked it even when it ran twice. It was unique.
Kevin
Poster: Ruth
Dated: Saturday March 27 2004 - 5:37:41 GMT
Yep, nice touch and is unique. I did find a way to fix it, but not with the images as are. If instead of making the top nav images the animation, you make the first one in the submenus the animation with the line at the top it will not repeat as you move off, but I still think it looks really neat doing it twice.
Ruth