StudioPress Community Forums

StudioPress Community Forums (http://www.studiopress.com/support/index.php)
-   General Discussion (http://www.studiopress.com/support/forumdisplay.php?f=7)
-   -   IE8 JavaScript Error (http://www.studiopress.com/support/showthread.php?t=10115)

shubeydo 06-21-2009 09:46 PM

IE8 JavaScript Error
 
Can someone please tell me why I continually get this JavaScript error with IE8. The page loads correctly but it always shows this error:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Mon, 22 Jun 2009 02:18:10 UTC


Message: 'document.getElementById(...)' is null or not an object
Line: 52
Char: 2
Code: 0
URI: http://thegreatmonkey.com/


Here is the code from my site:

Code:

-->
</style>
 
<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"), "");
                }
        }
 
}


Craig Tuller 06-22-2009 09:49 AM

Re: IE8 JavaScript Error
 
viewtopic.php?f=64&t=5302

In your case, you have NO menu or submenu, so you will need to remove the entire javascript section used for the menus.

shubeydo 06-22-2009 11:24 AM

Re: IE8 JavaScript Error
 
You were exactly correct Craig. Thank You so much for your quick reply. Best to you.


All times are GMT -5. The time now is 06:55 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.