ActiveXObject issue in javaScript

Posted by shan.swf on Stack Overflow See other posts from Stack Overflow or by shan.swf
Published on 2010-02-04T12:35:04Z Indexed on 2010/03/21 15:31 UTC
Read the original article Hit count: 452

hi..

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.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about activex