Background color stays on in main frame

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Background color stays on in main frame

Post by kevin3442 »

Hello,

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.

Kevin
menufurfer
Super Advanced
Super Advanced
Posts: 37
Joined: Sun Jul 28, 2002 4:40 am

Post by menufurfer »

Kevin:

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
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

mfurf,

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()
{
  on_load();
}

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

-- Kevin
Post Reply