user264968
user264968

Reputation:

ActiveXObject issue in javaScript

I wrote a javascript function in my html page to execute an .exe file. for this i used ActiveXObject. my function is:

//~~~~~~~~~~~~~~~~~~~~~~~~~~~JavaScript~~~~~~~~~~~~~~~~

function openWin(url)
 {

  if (!document.all) {
         alert ("Available only with Internet Explorer.");
     return;
   }


var ws = new ActiveXObject("WScript.Shell");
ws.Exec(url);
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It works fine but there is a alert "An ActiveX control might be unsafe to interact with other parts of the page. Do you want to allow this interaction?" comes up to confirm. If i say YES only it will get loaded.

Pls anyone help me on this how to avoid this pop-up coming every time when i reload my html page.

Upvotes: 2

Views: 2763

Answers (2)

T.J. Crowder
T.J. Crowder

Reputation: 1074305

You can't. Your users can, by giving your page trusted access to their computer (e.g., by adding the URL to the "Trusted Sites" zone).

Upvotes: 3

uthark
uthark

Reputation: 5363

You should enable activeX in Internet explorer security settings.

http://www.nrc.gov/reading-rm/adams/install/enabling-active-x.html

If you want your users to not seeing this message, then they should enable it. But you can't force them to do it because of security issues.

Upvotes: 0

Related Questions