"Mokoena" <mokoena (AT) amstel (DOT) com> wrote:
Quote:
How do I get radio buttons to work in HTML, so that only one in a group can
be selected at a time? |
Give them all the same name.
Quote:
How do I get the value returned from them? |
Include the appropriate URI in the action attribute of the form.
Quote:
How do I reference them in JavaScript? |
document.forms[i].elements[i]
or
document.formname.elementname
or
document.getElementById("id")
name=value
So,
<input type="radio" name="cheese" value="cheddar">
<input type="radio" name="cheese" value="stilton
<input type="radio" name="cheese" value="brie">
<input type="radio" name="cheese" value="roquefort">
Will on submission of the form return cheese=stilton if the second
radio button is selected.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <steve (AT) pugh (DOT) net> <http://steve.pugh.net/>