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 mand line?
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 mand line?
Share Improve this question asked Nov 13, 2011 at 3:15 ssnssn 2,7414 gold badges28 silver badges32 bronze badges 1- on internet explorer you can use ActiveX object, but the user will be warned about the danger. – Victor Commented Nov 13, 2011 at 5:05
4 Answers
Reset to default 3No. It's a browser security issue. Client-side JavaScript cannot acces things outside the browser.
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.
See Google's Native Client SDK : http://code.google./chrome/nativeclient/
use window.external.c_function ... but you need to see how to pile you C code... we are doing something like this in one of our project ... and it is working like charm ...
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744573463a4581594.html
评论列表(0条)