I'd like to run a shell command on the server side when a client triggers an event. Is it possible with javascript?
-
3You need to connect to the server, so javascript alone cannot do it.fedorqui– fedorqui2013-09-06 12:03:36 +00:00Commented Sep 6, 2013 at 12:03
-
maybe nodejs? nodejs is JS :)pleasedontbelong– pleasedontbelong2013-09-06 12:05:28 +00:00Commented Sep 6, 2013 at 12:05
-
2client $.ajax -> server, server -> triggers shell command.Andrey Yasinishyn– Andrey Yasinishyn2013-09-06 12:06:18 +00:00Commented Sep 6, 2013 at 12:06
Add a comment
|
1 Answer
I don't believe this is possible with client-side JavaScript.
Althought it's not really your question, you could do it if you were using NodeJS server-side (http://nodejs.org/api/all.html#all_child_process_exec_command_options_callback).