How to launch an application using javascript?

Sangam254 picture Sangam254 · Aug 2, 2011 · Viewed 10.6k times · Source

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.

Answer

lamelas picture lamelas · Aug 2, 2011

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.