Govindh Govindh - 1 year ago 69
HTML Question

How to map buttons in html to running an executable file

<!DOCTYPE html>

<h1>Led On/Off</h1>

<input type="button" value="Led on" onclick="RunFile();"/>
<input type="button" value="Led off" onclick="RunFile();"/>


This is my html code. I'd link to map those buttons to 2 executable files to switch on and off led in wandboard. How will i do it?

Answer Source

According to your comment the LED is connected to the Server while you try toggle it from a client.

Since the HTML Page you send to the client is then rendered locally (on the CLIENT) you will have to create some kind of LED Toggle Service on the Server. You would add a call to the Service to your HTML page. This for example could be a link:

<a href="myLEDService/LED/ON"> Led On </a>
<a href="myLEDService/LED/OFF"> Led Off </a>

I can only speculate what your executeable to toggle the LED is, and based on the assumption that the apache tag you added is accurate you might want to have a look at Apache CGI

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download