1

I have a webpage file (page.html) and I use javascript to make it work. I have these two sources of js / jquery in my header tag:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script> ... my custom js functions ... </script>

When I open that html page in IE11, I get this message:

Internet Explorer restricted this webpage from running scripts or ActiveX controls.

I never see that message when I visit big websites like e.g. pubmed (https://www.ncbi.nlm.nih.gov/pubmed/). But when I right-click and hit "Q" to observe the source code of pubmed, I see that there are <script> tags too. Why does my own js get blocked?

user3182532
  • 1,097
  • 5
  • 22
  • 37
  • Are you running a local web server? If not you have to use a custom security level to run scripts in IE – AndFisher Sep 19 '17 at 14:25
  • Possible duplicate of [How to automatically allow blocked content in IE?](https://stackoverflow.com/questions/7038724/how-to-automatically-allow-blocked-content-in-ie) – George Sep 19 '17 at 14:26
  • I just right click the html file and click on "open with internet explorer". no web server involved, just a plain html file – user3182532 Sep 19 '17 at 14:30
  • https://msdn.microsoft.com/en-us/library/ms537628(v=vs.85).aspx could help – Pete Sep 19 '17 at 14:40

1 Answers1

0
  1. Open Internet Explorer.

  2. On the Tools menu select Internet Options.

  3. Select the Advanced tab.

  4. Scroll down to find the Security option.

  5. Check the checkbox " Allow active content to run in files on My Computer ". source: JavaScript: "Internet Explorer restricted this webpage from running scripts or ActiveX controls". and it is working for me