JPro
JPro

Reputation: 6556

running javascript in IE without warning 'the webpage you are trying to access wants to run activex control'

is there anyway to stop popping up the warning message in IE when trying to execute javascript?

I want some solution which does not need modifying the settings in the IE manually by the user.

Thanks,

Upvotes: 1

Views: 3550

Answers (2)

cllpse
cllpse

Reputation: 21727

This only occurs when you open local files. And no; there's no way to avoid this.

Or so I thought.. Untill Grant Wagner came by and gave his two cents :)

Upvotes: 2

Grant Wagner
Grant Wagner

Reputation: 25941

If the message is only appearing for you when you run the scripts locally and not for your visitors when you upload your scripts to the server, I'd suggest one of three things:

  1. Have a test server that you can use to run the things you are developing. This will avoid issues that might come up when you are running scripts locally. Apache or IIS should allow you to do this, although you will have to research how to get the server you choose to use working like your production environment (example: PHP).
  2. If you want to continue to test your scripts locally, you can give your pages the Mark of the Web (<!-- saved from url=(0014)about:internet -->). This will force the page to run in the Internet Security Zone and avoid the message you see when you open an HTML file containing script locally.
  3. If there is some reason you can't give the pages the MOTW, you can configure Internet Explorer to allow scripts to execute locally (note this is a bit dangerous since local files containing script can do something malicious). Go to Tools > Internet Options > Advanced tab > scroll to the Security section and check Allow active content to run in files on My Computer

Upvotes: 8

Related Questions