Page 1 of 1

Drop-downs in IE 6 again, not showing

Posted: Mon Sep 10, 2007 10:53 am
by sturla69
I've searched and read a lot of posts in the forum, but cannot seem to find a solution to my problem.

This is the site: http://utvikling.newelement.no/kiskompetanse/

The problem is... Use IE 6, Click on "Truck" icon, two new menues appear, "Truck" and "Stortruck", these two menus both have drop-downs but I cannot get them to show up/down... Using different styles for the templates, and the template for this menu uses primary-navmeny, added "meny" to all the css-styles for correct styling of this perticular menu. Also added a new javascript file, CSSMenu_2.js, where I've changed the var's to match my new styles. JS like this:

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-navmeny"; // CSS ID for the menuwrapper
var menuadd = "hmeny";  // 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 = "menuhmeny"; // 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 + "$"), "");
			}
		}
	}
}
Using full path when including js-file, like this:





The menu works perfectly in FF....haven't tried it in IE7.

Any help greatly appreciated!!

Re: Drop-downs in IE 6 again, not showing

Posted: Mon Sep 10, 2007 12:05 pm
by bterkuile
you have in your CSSMenu_2.js file:
var cssid = "menuwrappermeny"; // CSS ID for the menuwrapper

in stead of:

var cssid = "primary-navmeny"; // CSS ID for the menuwrapper

Re: Drop-downs in IE 6 again, not showing

Posted: Mon Sep 10, 2007 12:24 pm
by sturla69
Well, yes. I saw it... My mistake, fixed now, but doesn't solve my issue... Any other tips?

Re: Drop-downs in IE 6 again, not showing

Posted: Mon Sep 10, 2007 12:45 pm
by bterkuile
I think if you change:
var menuh = "menuhmeny";
to
var menuh = "menuactivehmeny";

in the js file it should work

Re: Drop-downs in IE 6 again, not showing

Posted: Mon Sep 10, 2007 12:54 pm
by Dr.CSS
I've tried this numerous times, it has to do with 2 JS calls, IE don't like it, now that I think about it there was a tutorial on Dynamic Drive about getting 2 JS to load on the same page never looked into it for this but have used it before on a page that had quite a few JS calls and got them to all load...

http://dynamicdrive.com/

Re: Drop-downs in IE 6 again, not showing

Posted: Wed Sep 12, 2007 6:27 am
by sturla69
Bterkuile: This didn't do it...

I'll try and figure out this last suggestion.

Re: Drop-downs in IE 6 again, not showing

Posted: Wed Sep 12, 2007 6:42 am
by sturla69
Mark: can't seem to find the tutorial you are referencing, or maybe I'm just not able to utilize the one I found. Could you maybe try to explain how to solve this? I would be most grateful...

Found this: http://www.javascriptkit.com/javatutors ... java.shtml

But since none of the functions are loaded like described in the tutorial, I get confused... I guess this should all be done in the template?

Re: Drop-downs in IE 6 again, not showing

Posted: Wed Sep 12, 2007 7:31 pm
by Dr.CSS
Any reason you have changed the 0}

{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}

{elseif $node->index > 0}
{/if}
id}"[/color]>id}"[/color] href="{$node->url}"> 
{/foreach}
{repeat string="" times=$node->depth-1}

{/if}