Search code examples
javascriptinternet-explorer

Browser Compatability - Internet Explorer and JavaScript


I know there's a few questions like this out there already but I can find no answer to this. I am having an issue with my site not running JS in IE (I'm using IE 11 for testing).

If I go to my site in IE it shows me the same as what it would be in another browser with JS disabled, except it does not show the error I have inside the <noscript> tag.

I went into the settings and enabled everything under the 'scripting' section and nothing changed. However when I changed it to prompt, it asked me 4 times if I wanted to allow scripts (I obviously clicked yes) and then it loaded my page but the JavaScript was still not working only now it showed me the contents of the <noscript> tag.

enter image description here

Is there anything I can do to fully allow JavaScript in IE or is there a way I can modify my JS to allow it to run in IE?

Edit

There are no errors in the console and you can test this yourself with the following:

<script>
document.write('script');
</script>

<noscript>
noscript
</noscript>

Solution

  • It seems there's some issue with your Internet Explorer. I could just give some suggestions due to this is not reproducible in my Internet Explorer. You can try the following methods:

    • Make sure you have installed all the updates for Internet Explorer 11 from Windows Updates.
    • Make sure you have enabled JavaScript in Windows. You can refer to this article for detailed steps.
    • Try to re-register jscript.dll file. To do so, follow the steps given below:

      1. Click on Start, type Command Prompt or cmd in the Search box.

      2. Right-click Command Prompt from the start search list and then click Run as administrator. (Note: If you are prompted for an administrator password or for a confirmation, type the password, or click Allow.)

      3. At the command prompt, type regsvr32 jscript.dll and press Enter.

      4. Type Exit and press Enter.

    • If the above methods not work, try to reinstall or repair Internet Explorer in Windows. You can check this article for detailed steps.