Page 1 of 1

Horizontal menu doesn't work on IE6

Posted: Thu Apr 05, 2007 9:54 am
by deborah
My horizontal menus aren't working in IE 6. The drop-downs don't display in IE6 but work fine in IE 7 and FF.

I'm using CMSMS 1.04 with a customized template(imaphoriz). I have the following in my template:




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 = "imap"; // 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 + "$"), "");
			}
		}
	}
}
The CSSMenu1.js file is uploaded to the specified location. No JS errors are being displayed.

I couldn't find a solution by searching...anyone have an idea for me to try?

Thanks you

Re: Horizontal menu doesn't work on IE6

Posted: Fri Apr 06, 2007 6:04 pm
by applejack
Please see this post and use the original .js install file which comes with CMSMS for the horizontal menu.


Re: Horizontal menu doesn't work on IE6

Posted: Fri Apr 06, 2007 6:21 pm
by Dr.CSS
If everything is where your path says then you also need to make sure your menu template has the ...

I know it says,,, var cssid = "imap"; // CSS ID for the menuwrapper,,, but it means the ul id, normal/default says primary-nav which is what the default menu template uses, if you have not made a new menu template to reflect the changes in the JS it won't work or show errors...

Re: Horizontal menu doesn't work on IE6

Posted: Wed Apr 18, 2007 10:41 am
by accademico
mark wrote: If everything is where your path says then you also need to make sure your menu template has the ...

I know it says,,, var cssid = "imap"; // CSS ID for the menuwrapper,,, but it means the ul id, normal/default says primary-nav which is what the default menu template uses, if you have not made a new menu template to reflect the changes in the JS it won't work or show errors...
My var cssid is set correct according to the template. Still the submenu's don't show in IE-6.0.

Re: Horizontal menu doesn't work on IE6

Posted: Wed Apr 18, 2007 7:48 pm
by Dr.CSS
I have had problems using a different path for that file, try putting it in the original position/folder or try / in front of the path...

Do you have a base href in the header?...

Re: Horizontal menu doesn't work on IE6

Posted: Thu Apr 19, 2007 9:50 am
by accademico
Tnx Mark, I tried it adding the slash. But i also added complete path and it works fine now. Myself do not run IE 6.0 but i asked a friend and he told me that it shows the submenus.