开发者

Internet Explorer 8 is blocking CSS, JQuery

I'm in the process of developing a website that makes use of JQuery's superfish. Now if I want to test it in Internet Explorer 8 I'm getting the messageTo help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer in firefox everything runs smoothly. My code is below

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>site</title>


<link rel="stylesheet" type="text/css" href="css/site.css">
<link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen">
<link rel="stylesheet" type="text/css" media="screen" href="css/superfish-navbar.css" />
<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="js/hoverIntent.js"></script>
<script type="text/javascript" src="js/superfish.js"></script>
<script type="text/javascript">

    jQuery(function(){
         $("ul.sf-menu").superfish({ 
             delay:         0,
             speed:         'fast',
             autoArrows:    false,
             dropShadows:   false,
        });
    });

</script>

</head>

if I remove the following code it works fine

<link rel="stylesheet" type="text/css" href="css/site.css">
<link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen">
<link rel="stylesheet" type="text/css" media="screen" href="css/superfish-navbar.css" />
<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="js/hoverIntent.js"></script>
<script type="text/javascript" src="js/superfish.js"></script>
<script type="text/javascript">

        jQuery(function(){
             $("ul.sf-menu").superfish({ 
                 delay:         0,
                 speed:         'fast',
                 autoArrows:    false,
                 dropShadows:   false,
            });
        });

    </script>

if I only leave in the first css line I'm getting the er开发者_运维百科ror again, thus leaving only

<link rel="stylesheet" type="text/css" href="css/site.css">

Are there any solutions to this? I don't want my visitors to click on allow everytime the access the site ;-( Clueless here


I suspect this is because you are running this script locally. IE blocks scripts (and I guess CSS, which can run scripts with expression) for web pages on the hard drive in order to help stop viruses.

Try uploading it to a remote server, or setting up a web server at http://localhost/. You probably shouldn't have those issues once not using file:\\\. You can also change your local intranet security settings to prevent these warnings, but I'd recommend against it; they're set by default for a reason. Your call.


Running the site in the local zone is what's causing your problem. If you want to continue testing locally, you can use a Mark of the Web:

<!-- saved from url=(0022)http://www.example.com/ -->

The parenthesized number should be 4 digits specifying the length of the URL.

This will force IE to run the site in the security zone that applies to the domain specified. Just remember to remove it when you upload your site for production, although leaving it in would have no detrimental effect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜