Execute unix command from an html page in windows

i have a problem situation, where i have a html file say click.html. i have a button "ls" in that html page. i run this html file in windows....Now say if i click that "ls" button it must connect to the unix server and execute ls and return the results back to html page in windows. can anyone tell me how to do this??

If you need a dinamic generation , PHP is your solution.

i do not know php...can you help with this....can you send a sample file

this is not possible with plain HTML

ANY SOLUTION????.....i mean any approach that i can follow to do it....

niteesh,

in simple, this needs something which can execute code on your behalf on web server, whereas using simple HTML ( as far as I know ) is only the presentation of the contents to client's browser.

for this 'ls' thing, what you need to do is the enable your server side to execute a command on server side and then manipulate the resulting information to present to client.

This is where your server side scripting languages come in place. They, like starting from JavaScript, perl, PHP, python, ASP, JSP, and many more, are used to process a user's input based on the decisions that you involve using data structures like 'if-else-then', 'while-do', 'do-while', 'for-loop'. Once this data is processed on server side, then you prepare that data to be presented to customer.

like if you plan to execute a command on server when a client user clicks 'ls' button , you must have some destination setup on in <FORM> tag against "action" item

<form action="service.php" method="get">

now when a user will click a submit button, the service.php will be executed on the server side as opposed to HTML which has nothing to do on server in a basic form,
and then your code will in 'service.php' will be processed using a php processor which understands the php language's contructs, and providing service.php's formatted contents to client's browser, eventually displaying the data client had asked for.

in 'service.php', you declare variables, perform all actions based on the input received from previous page.

hope this helps.

Regards,
Nasir

Small correction to that: JavaScript is executed on the client, not the server.

pludi.

Thanks. I appreciate that.

You are only 99.9999% right :wink:
While not that much popular nowadays, server side javascript is as old as client side and still has some supporters: Server-side JavaScript - Wikipedia, the free encyclopedia