TheCandyman
Technical User
I'm working on a css dropdown menu that uses a little javascript. The problem is in IE6 the menu doesn't work i get this error
Here is the full page code, but i don't see why it messes up in IE6 but works in IE7 and FF3
Code:
Error: 'document.getElementById(...)' is null or not an object
Here is the full page code, but i don't see why it messes up in IE6 but works in IE7 and FF3
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"><head>[/URL]
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>.</title>
<link rel="stylesheet" href="includes/css/style.css" type="text/css" media="screen" />
<script type="text/javascript">
sfHover = function() {
[b]var sfEls = document.getElementById("nav").getElementsByTagName("LI");[/b]
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
</script>
</head>
<body>
<div id="container">
<div id="header">
<div id="logo"><a href="[URL unfurl="true"]http://www.WesternRegional.org/2009/">[/URL]
<span id="logotext">Western Regional<br />Dental Convention</span><br />
<span id="logotextDate">March 12-14, 2009</span></a></div>
</div>
<br class="clear"/>
<div id="menu">
<ul>
<li class="menutop">Home</li>
<li class="item"><a href="#">Home Page</a></li>
</ul>
<ul>
<li class="menutop">Attendees</li>
<li class="item"><a href="#">F.A.Q.</a></li>
<li class="item"><a href="#">View Speakers</a></li>
<li class="item"><a href="#">Special Events</a></li>
<li class="item"><a href="#">Exhibitor Search</a></li>
<li class="item"><a href="#">Registration</a></li>
<li class="item"><a href="#">Send Me Info</a></li>
</ul>
</div>
<br class="clear"/>
<br class="clear"/>
<div id="contenu">
<div id="contenu-mid">
<h1>General Information</h1>
</div>
</div>
<div id="contenu-bottom"></div>
<div id="footer">© 2008</div>
</div>
</body>
</html>