tags:

views:

177

answers:

2

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"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<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 error 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

+5  A: 

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.

Matchu
Yip, that was the problem, I ran the files from a Flash Drive. I copied it over to a web server and it seemed to solve the issue. Thank you. Much apprecaited
Roland
@Roland: Glad to help :) Make sure you click on the check mark next to an answer if it answered your question! (But also see Andy E...'s head's answer before you do - that might be a quicker solution, depending on your needs.)
Matchu
@Matchu: +1 for your sportsmanship ;-)
Andy E
@Matchu, I usually always work on a web server, was to lazy to copy the files over, but now it's done.
Roland
+3  A: 

As Matchu said, running the site in the local zone is what's causing your problem. Another option, besides uploading if you want to continue testing locally, is to use a Mark of the Web:

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

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.

Andy E