?
Solved

How can I get rid of the active content warning?

Posted on 2005-02-28
2
Medium Priority
?
194 Views
Last Modified: 2006-11-17
I have some CSS that is dynamically generated by Javascript. When I view the HTML file in IE, I get the following warning: "To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options..." How can I get rid of the active content warning?

This is the code in question:

<script type="text/javascript"><!--  
if (navigator.appName != "Netscape") {
var ieDivWidth = document.documentElement.offsetWidth - 103;
var ieDivHeight = document.documentElement.offsetHeight - 4;
document.write("<style type=\"text/css\">");
document.write("html {overflow:hidden;}");
document.write("#leftNav {width:99px ; height:" + ieDivHeight + "px; overflow:hidden; position:absolute; left:0px; top:0px;}");
document.write(".mainBody {width:" + ieDivWidth + "px; height:" + ieDivHeight + "px; overflow-x:auto; overflow-y:scroll; position:absolute; left:99px; top:0px;}");
document.write("</style>");
}
--></script>
0
Comment
Question by:mariita
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 32

Accepted Solution

by:
Batalf earned 1000 total points
ID: 13423972
Do you get this message when you open your file on your locale machine like

    C:\file\path\page.html

If yes, move your file to the web, open it over http in your browser(http://domain.com....) and the warning would be gone.

Batalf
0
 
LVL 32

Expert Comment

by:Batalf
ID: 13423989
You could also open the settings in Internet Explorer

Tools->Options->Advanced

--> Allow active content
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question