IE6 glitch for CSS drop-down menus

Drop down menus will not work correctly in IE6 without calling the following function.
HTML • JavaScript


<script language="JavaScript" type="text/javascript">
function startList() {
	if (document.all&&document.getElementById){
		navRoot = document.getElementById("mainnav");
		for (i=0; i<navRoot.childNodes.length; i++){
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function(){this.className+=" over";}
				node.onmouseout=function(){this.className=this.className.replace(" over", "");}
			}
		}
	}
}
</script>

Place the code below after the $$ViewBody field or your embedded view.

<script type=text/javascript>startList();</script>

Written by Frank Joseph Brefere III

Posted by fbrefere001 on Thursday May 15, 2008