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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:44

Background color stays on in main frame

Poster: kevin3442
Dated: Saturday September 7 2002 - 1:45:56 BST


First... thanks for creating and offering a great menu system! I will definitely be licensing its use for my company's site.

I am currently testing the menu (v3.5.02) in an HTML Help project. Since HTML Help relies on MS IE 4 or higher (I have 6.0.2600) , I figured the menu system should work much the same as it does on websites browsed with IE. For the most part, this assumption has held up. But I'm having one small difficulty.

I have two frames. The "header" frame holds the main menu; the "body"frame displays all other menus. The menus display properly for the most part, and the actions called by various selections work fine. But when I select from a menu in the body frame, the font and background color of the main menu item in the header frame remain in their "mouse on" state; i.e., the main menu item does not revert to its "mouse off" state after I make the selection. This only happens if the menu selection is a link to a different URL to display in the body frame; doesn't happen if the menu selection calls a function. As a workaround, I call top.header.closeallmenus() from the onLoad event in the <body> tag when a new document is loaded into the body frame. This works OK. It's quick, since the html files are all local (within the .chm file) and load quickly, but it seems like I'm forcing a behavior that is otherwise built in. I wonder if I'm missing something? Is this peculiar to HTML Help? I've read every previous post with the word "frame" in it, but couldn't find an answer. I did run across a description of a similar problem in this previous post, but saw no answer.

Any help is appreciated. Again... wonderful menu system! Thanks for all of your hard work.


Poster: menufurfer
Dated: Sunday September 8 2002 - 1:00:30 BST


I have a two frame setup which sounds similar to yours. I get that behavior in Netscape 4.7x but not in Netscape 5.5, the two browsers I use for quick testing (I'm soon going to install NS 7.0 - I hope it's worth the trouble). So it sounds like it's a browser version specific problem.

I wasn't too bothered by it in Netscape since the user might easily think it's designed to remain in mouseon mode in order to remind what header menu was selected. /mfurf

Poster: kevin3442
Dated: Monday September 9 2002 - 20:17:05 BST


Thanks for the reply. I'm thinking that, for IE, this behavior is peculiar to using the menus in HTML Help. When I browse the web with IE 5 and higher, this behavior doesn't occur in the frames example on the Milonic website. But with the same browsers installed, the behavior persists with HTML Help. If I have time, I might do the proper test and export the HTML Help project to a website, so I can compare the two environments running the same code.

Meantime, the onload call to the closeallmenus() function in mmenu.js seems to do the trick for me; removing the unwanted mouseon highlight. To make it easy, I override the onLoad event with my own on_load() function, and src that script into any page that shows up in the body frame (makes it easier to modify onload events later in the project, so I don't have to edit every affected page). In the example below, my header frame has been named "header" in the frameset definition.

window.onload = function()

function on_load()
  top.header.closeallmenus(); // remove highlight from mainmenu items
  // additional function calls as required

-- Kevin