Horizontal menu doesn't work on IE6

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
deborah

Horizontal menu doesn't work on IE6

Post 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
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: Horizontal menu doesn't work on IE6

Post by applejack »

Please see this post and use the original .js install file which comes with CMSMS for the horizontal menu.


Website Design & Production
http://www.applejack.co.uk
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Horizontal menu doesn't work on IE6

Post 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...
accademico

Re: Horizontal menu doesn't work on IE6

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Horizontal menu doesn't work on IE6

Post 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?...
accademico

Re: Horizontal menu doesn't work on IE6

Post 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.
Locked

Return to “Layout and Design (CSS & HTML)”