[thelist] javascript: ensuring that at least one radio button is selected

Tom Dell'Aringa pixelmech at yahoo.com
Wed Jun 9 14:31:49 CDT 2004


--- Joel D Canfield <joel at spinhead.com> wrote:
> I have two dozen radio buttons, named 'PrimaryIssue', all with
> different
> IDs/values. In this case, a default choice doesn't make sense. How
> do I
> ensure that at least one choice has been made?

Joel,

Remember that your radio button group is an array. Step through the
array and check each button to see if it is checked. If you go
through the whole loop and checked==false, nothing is checked and you
can do what you need to do.

HTH

Tom

=====
http://www.Pixelmech.com/ - read my latest blog posting!
http://www.crossandthrone.com/ - Eternal Life

John 3:16





More information about the thelist mailing list