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:41
Upgrade - problem with rollover highlighting - frames
Poster: BoodLooder
Dated: Tuesday June 14 2005 - 17:53:38 BST
JUST UPGRADED TO 5.726
I'm having a problem with rollover highlighting. When I 'mouse out' the menu items aren't going back to their origfinal colors and I can't figure out why.
I've been using the milonic menu quite some time now, and I've just downloaded the newest version. I'm trying to change the design of my site slightly and I want to have the main menu shown in a header frame, and have the sub menus shown horizontally in the 'body' frame. It's in this transistion that the problem is coming up. I haven't gotten so far as to update the submenus in the 'body' pages yet. When I preview the 'header' I get the highlighting problem.
Here is my frameset code.
Code:
<html>
<head>
<title>test</title>
</head>
<!-- FRAME DEFINITION -->
<frameset cols="*,715,*" frameborder="0" framespacing="0">
<frame name='left' src='html/side.htm' target='main' scrolling='no'>
<frameset rows="150, *, 24" border="0" frameborder="0">
<frame name="header" scrolling="no" noresize target="main" src="html/header.htm">
<frame name="primary" src="html/mainpage.htm" marginwidth="0" marginheight="0" target="_self">
<frame name="footer" src="aps/mainfoot.asp" marginwidth="0" marginheight="0" target="primary" scrolling="no">
</frameset>
<frame name='Right' src='html/side.htm' target='main' scrolling="no">
</frameset>
</html>
<head>
<title>test</title>
</head>
<!-- FRAME DEFINITION -->
<frameset cols="*,715,*" frameborder="0" framespacing="0">
<frame name='left' src='html/side.htm' target='main' scrolling='no'>
<frameset rows="150, *, 24" border="0" frameborder="0">
<frame name="header" scrolling="no" noresize target="main" src="html/header.htm">
<frame name="primary" src="html/mainpage.htm" marginwidth="0" marginheight="0" target="_self">
<frame name="footer" src="aps/mainfoot.asp" marginwidth="0" marginheight="0" target="primary" scrolling="no">
</frameset>
<frame name='Right' src='html/side.htm' target='main' scrolling="no">
</frameset>
</html>
Here is the code for the header.htm
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>USBC Offical Website</title>
<base target="main">
<style type='text/css'>
IMG
{
Position: relative;
top: 3;
}
</style>
<SCRIPT language=JavaScript src="../script/milonic/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=../script/milonic/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=../script/milonic/mmenudom.js><\/scr"+"ipt>");
</script>
</head>
<body bgcolor="beige">
<table cellspacing="0" width="715" border="0">
<tr>
<td align="center" bgcolor="navy" height="60">
-->
<img src="../art/head.jpg" />
</td>
</tr>
<tr>
<td align="center">
<script language=JavaScript>
if(!ns4)_d.write("<scr"+"ipt language=JavaScript src=../script/milonic/menu_data_header.js><\/scr"+"ipt>");
</script>
</td>
</tr>
<tr>
<td bgcolor="#000080" height="4">
</td>
</tr>
</table>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>USBC Offical Website</title>
<base target="main">
<style type='text/css'>
IMG
{
Position: relative;
top: 3;
}
</style>
<SCRIPT language=JavaScript src="../script/milonic/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=../script/milonic/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=../script/milonic/mmenudom.js><\/scr"+"ipt>");
</script>
</head>
<body bgcolor="beige">
<table cellspacing="0" width="715" border="0">
<tr>
<td align="center" bgcolor="navy" height="60">
-->
<img src="../art/head.jpg" />
</td>
</tr>
<tr>
<td align="center">
<script language=JavaScript>
if(!ns4)_d.write("<scr"+"ipt language=JavaScript src=../script/milonic/menu_data_header.js><\/scr"+"ipt>");
</script>
</td>
</tr>
<tr>
<td bgcolor="#000080" height="4">
</td>
</tr>
</table>
</body>
</html>
Here is my menu_data_header.js
Code:
_menuCloseDelay=150
_menuOpenDelay=150
_followSpeed=5
_followRate=50
_subOffsetTop=3
_subOffsetLeft=-10
_scrollAmount=3
_scrollDelay=20
with(menuStyle=new mm_style()){
offbgcolor="#F5F5DC";
offcolor="#000080";
onbgcolor="#20B2AA";
oncolor="#FFFF00";
bordercolor="#000080";
borderstyle="solid";
borderwidth="0";
separatorcolor="#000080";
separatorsize="1";
padding="6";
fontsize="70%";
fontweight="bolder";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="beige";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
overfilter="Fade(duration=0.3);Alpha(opacity=90);Shadow(color='#20B2AA', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
subimage="../art/menuback.gif";
}
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
orientation="horizontal";
overfilter="";
position="relative";
aI("text=Home;showmenu=Home;url=somelink.htm;target=primary;status=USBC HomePage;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Links;url=somehost/html/links.htm;target=primary;status=USBC Links;");
aI("text=Information;showmenu=Courtsub;target=primary;status=Law and Resources;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Filing<br />Information;showmenu=Filingsub;target=primary;status=Resources for those needing to do buisiness with the Court;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Divisional<br />Offices;showmenu=Divisions;target=primary;status=Inforamtion for each Divisional office with Maps;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Judges'<br />Chambers;showmenu=Judges;target=primary;status=Contact information for Judges;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Hearings;showmenu=Hearings;target=primary;status=Hearings Calendars;onfunction=openSubmenu();offfunction=closeSubmenu();");
}
drawMenus();
_menuOpenDelay=150
_followSpeed=5
_followRate=50
_subOffsetTop=3
_subOffsetLeft=-10
_scrollAmount=3
_scrollDelay=20
with(menuStyle=new mm_style()){
offbgcolor="#F5F5DC";
offcolor="#000080";
onbgcolor="#20B2AA";
oncolor="#FFFF00";
bordercolor="#000080";
borderstyle="solid";
borderwidth="0";
separatorcolor="#000080";
separatorsize="1";
padding="6";
fontsize="70%";
fontweight="bolder";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="beige";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
overfilter="Fade(duration=0.3);Alpha(opacity=90);Shadow(color='#20B2AA', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
subimage="../art/menuback.gif";
}
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
orientation="horizontal";
overfilter="";
position="relative";
aI("text=Home;showmenu=Home;url=somelink.htm;target=primary;status=USBC HomePage;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Links;url=somehost/html/links.htm;target=primary;status=USBC Links;");
aI("text=Information;showmenu=Courtsub;target=primary;status=Law and Resources;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Filing<br />Information;showmenu=Filingsub;target=primary;status=Resources for those needing to do buisiness with the Court;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Divisional<br />Offices;showmenu=Divisions;target=primary;status=Inforamtion for each Divisional office with Maps;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Judges'<br />Chambers;showmenu=Judges;target=primary;status=Contact information for Judges;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Hearings;showmenu=Hearings;target=primary;status=Hearings Calendars;onfunction=openSubmenu();offfunction=closeSubmenu();");
}
drawMenus();
I have this running on an inside test server and cannot expose this to outside users. Hopefully you can easily reproduce this condition with the code I supplied above. Thank you in advance for any help you might be able to provide.
(great product by the way)
onfunction / offfunction
Poster: BoodLooder
Dated: Tuesday June 14 2005 - 20:10:01 BST
This may or may not help you.
I removed the references to onfunction and offfunction and the problem went away, but according to the documentation for setting this menu up to communicate between frames, it won't work with out those references. So before I continue I'll wait for a reply. Please help..
Poster: Ruth
Dated: Tuesday June 14 2005 - 20:51:08 BST
Hi,
From your last post I am assuming that you are using the frames menu contained in the 5.726 version. There has been a change which will be implemented in 5.727. There is a 'pre' release available [url]http://www.milonic.com/menuvinfo.php[/url] if you want it for setting up your redesign. Make sure you login to get your licensed version of the pre-release, or you can download the sample in the Frames Demo which will give you the new frames setup [link below]. The final release of 5.727 will be out soon.
The new release will only contain mm_navframe.js only, the mm_contentframe.js file has been eliminated.
Directions and a demo for frames are in the Frames Demo
As to the setup you have now. The problem may be that you don't have any 'submenus' for the menu to open and also, you have the following problems based on the code you posted:
1. There is no call for the mm_navframe.js file
2. There is no call for the menu_data_header.js file in the head
3. There is a call for that file down in the table which seems to be calling only if it's netscape4.
Code:
<td align="center">
<script language=JavaScript>
if(!ns4)_d.write("<scr"+"ipt language=JavaScript src=../script/milonic/menu_data_header.js><\/scr"+"ipt>");
</script>
</td>
<script language=JavaScript>
if(!ns4)_d.write("<scr"+"ipt language=JavaScript src=../script/milonic/menu_data_header.js><\/scr"+"ipt>");
</script>
</td>
Are you trying to put the menu in a table? If so, you would
1. call all the files in the head as usual [including the menu_data_header.js
2. remove the main menu from that menu_data_header.js file
and either
a. place it in the table cell surrounded by script tags and including a drawMenus()
b. place it in it's own file with a drawMenus() and call that file in the table cell i.e.
Code:
<script language=Javascript src="main_data.js" type=text/javascript></script>
Hope this helps.
Ruth
Thanks
Poster: BoodLooder
Dated: Tuesday June 14 2005 - 21:45:47 BST
I will wait until the newest version is in full release, in the meantime, I'm going to move on with the other aspects of the redesign. Hopefully everything will work in the new version as I expect it will.
(I don't like putting the menu code directly on the html doc, that means you gotta update it every where you put that info. I like to put as much of my javascript in 'js' files as possible. And actually that call to ns4 is has a '!' 'not' operator. This is old code, I actually changed that now as well.
Here is the new code. (right now to get the demo together I'm putting the entire menu in the header, so it will work, but it would work much better if the subs were opening in the 'main' frame.
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<base target="main">
<style type='text/css'>
IMG
{
Position: relative;
top: 3;
}
</style>
<SCRIPT language=JavaScript src="../script/milonic/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=../script/milonic/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=../script/milonic/mmenudom.js><\/scr"+"ipt>");
</script>
</head>
<body bgcolor="beige" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" vspace="0" hspace="0">
<table cellspacing="0" width="720" border="0">
<tr>
<td align="center" bgcolor="navy">
<img src="../art/head.jpg" align='top' vspace='0' hspace='0' border='0' />
</td>
</tr>
<tr>
<td align="center" bgcolor="#000080">
<script language="javascript" src="../script/milonic/menu_data_header.js"></script>
<script language="javascript" src="../script/milonic/menu_data_body.js"></script>
<!--
<script language=JavaScript>
if(!ns4)_d.write("<scr"+"ipt language=JavaScript src=../script/milonic/menu_data_header.js><\/scr"+"ipt>");
</script>
-->
</td>
</tr>
</table>
</body>
</html>
I'm tweaking now on the colors etc. I can be patient on this for a bit. I'll try again when the newest releast hits, and will update this thread on my progress.