Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How can I get rid of the active content warning?

Posted on 2005-02-28
2
Medium Priority
?
199 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
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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.…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses
Course of the Month12 days, 12 hours left to enroll

578 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