Search code examples
javascriptactivexobject

How to launch an application using javascript?


I want to launch an application eg. notepad or MSword on click of a button using javascript function. I have tried ActiveXObject meant for IE.

function runApp()
{
    var shell = new ActiveXObject("WScript.shell");
    shell.run("notepad.exe", 1, True);
}

I need a solution which supports Firefox. Please suggest.
Thanks in advance.


Solution

  • You cannot use ActiveX commands from Firefox. See more here: http://support.mozilla.com/en-US/kb/activex And you cannot launch an application using Javascript. Maybe with a Java Applet, or something.