"Mokoena" <mo*****@amstel.com> wrote:
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.
How do I get the value returned from them?
Include the appropriate URI in the action attribute of the form.
How do I reference them in JavaScript?
document.forms[i].elements[i]
or
document.formname.elementname
or
document.getElementById("id")
What value is returned?
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 <st***@pugh.net> <http://steve.pugh.net/>