469,612 Members | 1,639 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

how to run a shell script using javascript

Hi,
I have a button. I want to run a shell script when i click that button.
My HTML code is given below:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <input type = "button" value = "run script" onclick = "some javascript func to run script()">
  6. </body>
  7. </html>
  8.  
Can anybody help me out for this problem?
Oct 28 '08 #1
3 9587
acoder
16,027 Expert Mod 8TB
This won't be possible with standard JavaScript on a normal web page. What are you trying to do?
Oct 28 '08 #2
This won't be possible with standard JavaScript on a normal web page. What are you trying to do?
Thanks for ur reply.
I have two buttons one is for start server and other for stop server.
To start a server one shell script is there and for stop also.
I want to do that when i click start button it should start my server for that i have to run that shell script.
Using java api Runtime and Process i can run shell script but by clicking a button how to run shell script i do not know.
Can you help me out?????
Oct 29 '08 #3
acoder
16,027 Expert Mod 8TB
If it's a shell script on the server, then use Ajax to call the server-side script. That's if you want to avoid a page unload. If not, you could just submit the page. If you're not familiar with Ajax, check out some of the links in the Off-site Links sticky.
Oct 29 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by C.Joseph Drayton | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.