Hello!
I have just started to write java scripts.when I enter script contents in wordPad and I want to open the Internet Explorer to see the results,this message appears.I want to know how can I solve this problem ??
Massage:to help protect your security,Internet Explorer has restricted this file from shwoing active content that coud access your computer .

Dani AI

Generated

A follow-up that expands on what @||asrin ran into and on the quick fixes from and . Internet Explorer is deliberately cautious about running active content from files on the local filesystem. Granting the one-off permission from the browser works, but for reliable development and safer testing there are better workflows.

WordPad often adds formatting (RTF) or the wrong encoding. Use a plain-text editor (Notepad, Notepad++, VS Code) and save the file with a real .html extension (Explorer must show extensions). A minimal test page looks like this:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>test</title>
</head>
<body>
  <script>
    alert('hello');
  </script>
</body>
</html>

To avoid IE’s local-file restrictions entirely, serve pages over HTTP from the machine. From a command prompt in the folder with the HTML file:

python -m http.server 8000   # Python 3
# then open http://localhost:8000/test.html in the browser

Serving files this way mirrors how pages run on the web and prevents zone/active-content prompts.

For quick, temporary local testing there is an IE option: Tools → Internet Options → Advanced tab → Security → check “Allow active content to run in files on My Computer” (restart required). That lowers local security; enable only on trusted machines and turn it off when done. Use IE’s F12 developer tools (Console) while debugging to catch syntax or runtime script errors. These steps preserve the one-off advice from / while giving safer, repeatable development approaches.

Recommended Answers

All 6 Replies

yeah, it is for security, but you should be able to simply click "allow"

Yes you do have an option to allow or disallow the files of your choice and if you click the check box the browser does remember that particular setting forever. Please select the appropriate option when you get a prompt from your browser.

thank you for your answers WebDave & sillyboy my problem solved .
as you said it was for internet security settings.

You are welcome Asrin. Please feel free to contact us for any further assistance on this. I'll be glad to provide all the required assistance.

Hi WebDave !
I am so pleased with your sense of assistance. My name is Nasrin not Asrin, anyway of course I will need your help for writing Java scripts because I am a software engineering student of university ,and it is my first year of entrance in university.

Hey Nasrin sorry for the confusion with your name that had happened. You can contact me anytime for all the required help and assistance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.