[WEB4LIB] RE: Radio buttons on forms

Thomas Dowling tdowling at ohiolink.edu
Thu Sep 2 14:24:23 EDT 2004


Norwood, Randy wrote:

>Actually, it is possible to have a set of radio buttons with none
>selected.
>  
>

In this case, the HTML 4.01 spec explicitly says that browser behavior 
is undefined (the HTML 2.0 spec explicitly said the browser must check 
the first button).  It may treat all the radio buttons as unchecked, or 
it may do something else. 

In practice, any browser you're likely to come across will treat every 
button in the set as unchecked.  But the usability problem here is that 
there's no way for users to say "Oops" and undo an initial check.  They 
can change their answer, but they can't go back to not having provided 
an answer.

>I've done this type of validation in javascript, and PHP and Perl on the
>server side. Javascript is preferable, IMO.  It's been a while since web
>  
>
>developers have had to be concerned about users not having adequate
>Javascript support--especially for something like form validation.
>  
>

Maybe, but now you need to worry about your savviest users choosing to 
disable it.  Remember that the maker of the world's most widespread 
browser tell you to use it with client-side scripting turned off.  If it 
really has to work, you really need to provide a fallback that doesn't 
rely on client-side scripting.


-- 
Thomas Dowling
tdowling at ohiolink.edu



More information about the Web4lib mailing list