
| Radio buttons are used to allow the user to select one,
and only one, item from a group of options. Radio buttons are
always used in multiples; there is no logical sense in having just one
radio button on a form, because once you click on it, you can't unclick
it. If you want a simple click/unclick choice use a check box instead.
To define radio buttons for JavaScript, provide each object with the same name. JavaScript will create an array of buttons out of them; you then reference the buttons using the array indexes. The first button in the series is numbered 0, the second is numbered 1, and so forth. Note that the VALUE attribute is optional for JavaScript-only forms. You'll want to provide a value if you submit the form to a CGI program running on the server, however. |