[thelist] Deselecting A Radio Box

Tony Light TonyLight at blueyonder.co.uk
Thu Jan 23 13:38:01 CST 2003


Gregory wrote...
> Is there a way to deselect a radio box?  Once a user selects a radio box
> (lets say there are 3 radio boxes) how can the user deselect the box so
> that no one box is selected?

Joe Lance provided a neat little Javascript that can be activated by a
button.

3 comments ...

1. The usual 'What if scripting is switched off?' argument.

2. How about a plain old HTML Reset button (which would have the unfortunate
side effect of resetting the whole form, so it is not a good idea unless
your form does not have much user input on it).

3. I thought that the point of a group of Radio buttons is that one (and
only one) should be on.  If it is a valid option to have none of your
existing radio buttons on, then you could have an additional radio button in
the group called 'Other' or 'None of the above' or whatever makes sense in
your context.

Cheers,
    Tony




More information about the thelist mailing list