cancel
Showing results for 
Search instead for 
Did you mean: 

HTML with LWIP

STayl.3
Associate II

Hello community, I am working on a project for my science class and followed a tutorial online to get lwip up and running and I managed to switch my LED On and Off via my web browser.

My question is I want to "save" a scene with a different button, but can't get it working. Here is a snippet of my code:

<tr>
<td><input value="Program" type="submit"></td>
</tr>
<tr>
<td><input value="SAVE SCENE" type="button" onclick="msg()"></td>
<script><form method="get" action="/leds.cgi"></form>  
    function msg() 
    {
      alert("Hello world!");
    }
    </script>
</tr>

I want the button "SAVE SCENE" to call the form-handler (CGIhandler) to execute code that will save the information to a SD Card.

The "Program" button already calls the form-handler and the code executes perfectly, just need to use a second button to execute a second piece of code.

Thanks

1 REPLY 1
Rainer1
Associate III

Hello,

have you tried to use the name attribute of the submit input tag as described here: https://stackoverflow.com/questions/547821/two-submit-buttons-in-one-form