I have two fourth-level menu items (and their fifth-level children) that appear to be "stuck down" when hovering over their 2nd level parent or 3rd level parent. When I view the source code for the menu items, the HTML code looks correct.
I have created some other fourth-level menu item pages in other sections, and the same thing happens.
The problem happens in both Firefox and IE 7.
I have seen something similar caused by a glitch in the back-end of the database when creating pages. I've had two pages that accidentally got the same hierarchy number (like 2.2 was assigned to both), so both appeared "clicked" or "selected." To fix that, I think I just changed one of the sets of numbers wherever it appeared in the database to the next available number in the hierarchy. (Using phpMyAdmin). Or I deleted the pages and recreated them... now I'm not sure. But the hierarchy numbers on these menu items are different, so that isn't the problem here (but I wanted to post that information iin case it helps someone with a similar problem).
We're using CMSMS 1.0.2, and I really didn't modify the standard menu templates all that much. I took out the arrows, and I think that was about it. We have horizontal menus. (The top level is horizontal).
Could this be a bug in the javascript for CSSMenu.jss where some regular expression that decides what is hovered over somehow doesn't limit the hierarchy numbers correctly (so, when 1.1.1 is moused-over, 1.1.1 and 1.1.1.x and 1.1.1.1.x are all treated the same incorrectly)? If so, does anyone know how to fix the problem?
I think the relevant code is below. The page is http://www.scriptwritersnetwork.org/ (but I may take those elements out so the site doesn't look too bad for too long). Mouse over "Programs" and then "Events" to see the incorrect effect.
Thanks for your help!
--Shaene
Shaene M. Siders
Volunteer
The Scriptwriters Network Foundation, Inc.
Here is the CSSMenu.jss
Code: Select all
// Javascript for the CMS CSS Menu Module
// Copyright (c) 2005 Alexander Endresen
// Released under General Public Licence
// This script will emulate the css :hover effect on the menu elements in IE
// The variables
var cssid = "primary-nav"; // CSS ID for the menuwrapper
var menuadd = "h"; // Character to be added to the specific classes upon hovering. So for example, if this is set to "h", class "menuparent" will become "menuparenth" when hovered over.
var menuh = "menuh"; // Classname for hovering over all other menu items
if (window.attachEvent) window.attachEvent("onload", cssHover);
function cssHover() {
var sfEls = document.getElementById(cssid).getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
if (this.className != "") {
this.className = this.className + menuadd;
}
else {
this.className = menuh;
}
}
sfEls[i].onmouseout=function() {
if (this.className == menuh) {
this.className = "";
}
else {
this.className = this.className.replace(new RegExp(menuadd + "$"), "");
}
}
}
}Here is the partial menu source code, which looks correct. The fourth and fifth level items are the ones that keep becoming active even if they're not.
Code: Select all
<li class="menuparent"><a class="menuparent"
href="http://www.scriptwritersnetwork.org/swn/index.php?page=outreach-programs" ><dfn>3: </dfn>Programs</a>
<ul>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=outreach-programs" ><dfn>3.1: </dfn>Programs</a>
</li>
<li class="menuparent"><a class="menuparent"
href="http://www.scriptwritersnetwork.org/swn/index.php?page=events" ><dfn>3.2: </dfn>Events</a>
<ul>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=events" ><dfn>3.2.1: </dfn>Upcoming Events</a>
</li>
<li class="menuparent"><a class="menuparent"
href="http://www.scriptwritersnetwork.org/swn/index.php?page=meeting-highlights" ><dfn>3.2.3: </dfn>Event Summaries</a>
<ul>
<li class="menuparent"><a class="menuparent"
href="http://www.scriptwritersnetwork.org/swn/index.php?page=2007-event-summaries" ><dfn>3.2.3.2: </dfn>2007</a>
<ul>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=ray-bradbury" ><dfn>3.2.3.2.1: </dfn>Ray Bradbury - 2/10/07</a>
</li>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=development-executives-panel" ><dfn>3.2.3.2.2: </dfn>Development Executives Panel - 5/12/07</a>
</li>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=tracy-friedman" ><dfn>3.2.3.2.3: </dfn>Tracy Friedman - 5/19/07</a>
</li>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=jason-clark" ><dfn>3.2.3.2.4: </dfn>Jason Clark - 6/9/07</a>
</li>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=nicole-berger" ><dfn>3.2.3.2.5: </dfn>Nicole Berger - 6/16/07</a>
</li>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=irisyamashita" ><dfn>3.2.3.2.6: </dfn>Iris Yamashita - 8/11/07</a>
</li>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=steve-kaire" ><dfn>3.2.3.2.7: </dfn>Steve Kaire - 8/18/07</a>
</li></ul>
</li>
<li class="menuparent"><a class="menuparent"
href="http://www.scriptwritersnetwork.org/swn/index.php?page=2008-2" ><dfn>3.2.3.3: </dfn>2008</a>
<ul>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=dara-marks" ><dfn>3.2.3.3.1: </dfn>Dara Marks - 5/17/08</a>
</li></ul></li></ul>
</li>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=past-events" ><dfn>3.2.4: </dfn>Past Events List</a>
</li>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=speaker-series-maps-to-raleigh-studios" ><dfn>3.2.5: </dfn>Speaker Series: Raleigh Studios Location</a>
</li>
<li><a
href="http://www.scriptwritersnetwork.org/swn/index.php?page=seminar-series-cbs-radford-studios-location" ><dfn>3.2.6: </dfn>Seminar Series: CBS Studio Center Location</a>
</li></ul>

