BigScaryRobot
Member
Posted 3 years ago #
I'm getting this error as soon as I load the page.
Line: 25
Char: 2
Error: 'document.getElementById(...)' is null or not an object
Code: 0
URL: http://pistolsatnoonish.com/blog/
I have no idea how to troubleshoot something like this. Any help would be greatly appreciated. I'm sure it's something stupid I did while tinkering. :)
BigScaryRobot
Member
Posted 3 years ago #
Well, not sure if this will fubar things down the road, but I just removed this bit from the header.php . . .
<script type="text/javascript"><!--//--><![CDATA[//><!--
sfHover = function() {
if (!document.getElementsByTagName) return false;
var sfEls = document.getElementById("nav").getElementsByTagName("li");
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>
. . . and the error is now gone. :)