How do I keep popup menu parent highlighted?

I'm creating popup menus in Dreamweaver 8 using the behaviors library (onMouseover & onMouseout). They work fine, but what I'd like is that when the mouse is over the popup menu choices, the parent object (that you rollover to get the popup menu to appear) stays highlighted. Is there a variable somewhere I need to alter? Is there a way to differentiate a regular onMouseout event from a popup rollover?

Attached code is the script call in the document head, followed by the onMouse events on the pages, and finally the first part of the.js file code.

thank you!
function mmLoadMenus() {
  if (window.mm_menu_0325080801_0) return;
            window.mm_menu_0325080801_0 = new Menu("root",132,16,"Geneva, Arial, Helvetica, sans-serif",9,"#333333","#333333","#f9f0f1","#FFFFFF","left","middle",10,0,500,-5,7,true,false,true,0,true,true);
  mm_menu_0325080801_0.addMenuItem("catering menus","location='cateringmenus.html'");
  mm_menu_0325080801_0.addMenuItem("catering FAQs","location='cateringfaqs.html'");
  mm_menu_0325080801_0.addMenuItem("just for weddings","location='justweddings.html'");
          window.mm_menu_0401112117_0 = new Menu("root",131,15,"Geneva, Arial, Helvetica, sans-serif",9,"#333333","#333333","#f9f0f1","#FFFFFF","left","middle",3,0,500,-5,7,true,false,true,0,true,true);
  mm_menu_0401112117_0.addMenuItem("press releases","location='press.html'");
  mm_menu_0401112117_0.addMenuItem("media downloads","location='press.html'");
} // mmLoadMenus()
<table width="124" border="0" cellpadding="5" cellspacing="0" bgcolor="#e0b4b7">
            <td onMouseover="this.bgColor='#f9f0f1'" onMouseout="this.bgColor='#e0b4b7'"><a href="index.html" class="mainNav">&nbsp;home            </a></td>
            <td onMouseover="this.bgColor='#f9f0f1'" onMouseout="this.bgColor='#e0b4b7'"><span class="mainNav">&nbsp;<a href="menus.html">menus            </a></span></td>
            <td onMouseover="this.bgColor='#f9f0f1'" onMouseout="this.bgColor='#e0b4b7'"><span class="mainNav">&nbsp;<a href="winelist.html">wine list        </a></span></td>
            <td bgcolor="#f9f0f1"><span class="mainNav"><a href="events.html" name="link2" id="link1" onmouseover="MM_showMenu(window.mm_menu_0325080801_0,122,-6,null,'link2')" onmouseout="MM_startTimeout();">&nbsp;events &amp; catering</a></span></td>
            <td onMouseover="this.bgColor='#f9f0f1'" onMouseout="this.bgColor='#e0b4b7'"><span class="mainNav">&nbsp;<a href="media.html" name="link3" id="link1" onmouseover="MM_showMenu(window.mm_menu_0401112117_0,118,-6,null,'link3')" onmouseout="MM_startTimeout();">media            </a></span></td>
            <td onMouseover="this.bgColor='#f9f0f1'" onMouseout="this.bgColor='#e0b4b7'"><span class="mainNav">&nbsp;<a href="phototour.html">photo tour        </a></span></td>
            <td onMouseover="this.bgColor='#f9f0f1'" onMouseout="this.bgColor='#e0b4b7'"><span class="mainNav">&nbsp;<a href="chef.html">about the chef</a></span></td>
function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh, halgn, valgn, pad, space, to, sx, sy, srel, opq, vert, idt, aw, ah) 
	this.version = "020320 [Menu; mm_menu.js]";
	this.type = "Menu";
	this.menuWidth = mw;
	this.menuItemHeight = mh;
	this.fontSize = fs;
	this.fontWeight = "plain";
	this.fontFamily = fnt;
	this.fontColor = fclr;
	this.fontColorHilite = fhclr;
	this.bgColor = "#555555";
	this.menuBorder = 1;
	this.menuItemBorder = 1;
	this.menuItemIndent = idt;
	this.menuItemBgColor = bg;
	this.menuItemVAlign = valgn;
	this.menuItemHAlign = halgn;
	this.menuItemPadding = pad;
	this.menuItemSpacing = space;
	this.menuLiteBgColor = "#ffffff";
	this.menuBorderBgColor = "#777777";
	this.menuHiliteBgColor = bgh;
	this.menuContainerBgColor = "#cccccc";
	this.childMenuIcon = "arrows.gif";
	this.submenuXOffset = sx;
	this.submenuYOffset = sy;
	this.submenuRelativeToItem = srel;
	this.vertical = vert;
	this.items = new Array();
	this.actions = new Array();
	this.childMenus = new Array();
	this.hideOnMouseOut = true;
	this.hideTimeout = to;
	this.addMenuItem = addMenuItem;
	this.writeMenus = writeMenus;
	this.MM_showMenu = MM_showMenu;
	this.onMenuItemOver = onMenuItemOver;
	this.onMenuItemAction = onMenuItemAction;
	this.hideMenu = hideMenu;
	this.hideChildMenu = hideChildMenu;
	if (!window.menus) window.menus = new Array();
	this.label = " " + label;
	window.menus[this.label] = this;
	window.menus[window.menus.length] = this;
	if (!window.activeMenus) window.activeMenus = new Array();

Open in new window

Who is Participating?

Improve company productivity with a Business Account.Sign Up

Michel PlungjanConnect With a Mentor IT ExpertCommented:
Strange the attachement is now visible

Assuming the links change a frame or an iframe you can do something like this
NOTE: BE MORE CONSISTENT - do not use spans everywhere and clean up the whitespace before and after text and tags!!!

.over { background-color:#f9f0f1}
.out { #e0b4b7 }
var saveCell = "";
function swap(lnk,on) {
  var currentCell =;
  if (saveCell == currentCell) return;
  if (saveCell) document.getElementById(saveCell).className="mainNav out";
  document.getElementById(currentCell).className=(on)?"mainNav over":"mainNav out";
function clickIt(lnk) {
  saveCell =
<table width="124" border="0" cellpadding="5" cellspacing="0" bgcolor="#e0b4b7">
            <td id="indexCell" class="mainNav over"><a href="index.html" onMouseOver="swap(this,1)" onMouseOut="swap(this,0)" onClick="clickIt(this)">home</a></td>
            <td id="menusCell" class="mainNav"><a href="menus.html"  onMouseOver="swap(this,1)" onMouseOut="swap(this,0)" onClick="clickIt(this)">menus</a></td>
            <td is="wineCell" class="mainNav"><a href="winelist.html"  onMouseOver="swap(this,1)" onMouseOut="swap(this,0)" onClick="clickIt(this)">wine list</a></td>

Open in new window

Samuel LiewCommented:
There is insufficient information to proceed.
Michel PlungjanIT ExpertCommented:
If you load a new page each time, then it is much easier, just remove the scripts from the link of the page you are on:

            <td id="indexCell" class="mainNav over">home</td>

on the home page

CWS (haripriya)Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.