Html Radio buttons on Parallax Internet Netburner Kit
microchip2
Posts: 5
I am trying to setup·html radio buttons on a web page displayed from a Parallax Internet Netburner Kit.·
<form name="Test" action="\example.htm" method="post">
<br>
<Input name="Nb_var40" type= "radio"·· Value="ON"<Nb_var40>">ON
<Input name="Nb_var40" type= "radio"·· Value="OFF" <Nb_var40>">OFF
<input type="submit"value="submit" > Nb_var40=<Nb_var40>
</form>
This will update the NB_var40 location, but the buttons are not updated.
Post Edited (microchip2) : 5/1/2010 7:34:54 PM GMT
<form name="Test" action="\example.htm" method="post">
<br>
<Input name="Nb_var40" type= "radio"·· Value="ON"<Nb_var40>">ON
<Input name="Nb_var40" type= "radio"·· Value="OFF" <Nb_var40>">OFF
<input type="submit"value="submit" > Nb_var40=<Nb_var40>
</form>
This will update the NB_var40 location, but the buttons are not updated.
Post Edited (microchip2) : 5/1/2010 7:34:54 PM GMT
Comments
This would be correct HTML but will not show selected radio button:
This would "pre-check" the radio button "off"
The problem is that if you want to use the actual value of the variable Nb_var40 to show which button is selected, the value of Nb_var40 must be "selected" for "on" and "" (empty) for off. That's not going to happen, as Nb_var40 (I presume) is not and can not be a string.
It might be easier to do this with JavaScript, so that the value of Nb_var40 can be tested in the browser and then properly set the select state of the radio button:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
·
The following code is still not working correctly.
·
The pink responds well to JavaScript. I am no expert on it but here is what I did:
Open a notepad to put your Script in Save as app.js (file type- All Files, Encoding UTF-8)
Put that file in the PINK home directory right next to your index file.
On my main index page I have: Hope this helps someone.