I have a button that is created using javascript:
<button id="connectbutton" onclick="start()">Refresh Data</button>
Next, I have these radio buttons as well:
<input type="radio" name="args" value="Heat">Set thermostat mode to HEAT.<br>
<input type="radio" name="args" value="Off">Set thermostat mode to OFF.<br>
<input type="radio" name="args" value="Cool">Set thermostat mode to COOL.<br>
<input type="radio" name="args" value="REDALERT">Set thermostat mode to RED ALERT.<br>
<input type="submit" value="Do it!">
Is there a way to have the radio types listen to the button. Basically, if I select a mode, and press refresh data it should do it in whatever I have programmed for that mode.