I have a web page. I would like to include javascript in the webpage such that on a particular action, the javascript will call an external program, like a C applet program, on my machine. Is it possible to call an external C program using Javascript either directly or through command line?
4 Answers
No. It's a browser security issue. Client-side JavaScript cannot acces things outside the browser.
1 Comment
You can't do it for other users as maxedison explained.
However you can install something called a network.protocol-handler in the browser, javascript can trigger that, and that can run whatever you want.
For example in firefox create the key network.protocol-handler.app.foo and set the value to the executable you want to run. If you go to foo://blah then the executable will run with the value blah as a parameter.
Of course you can't do this to someone else's machine, but you can to your own.