Tuesday, September 04, 2007

Case Sensitive Name Attribute for Radio Buttons in FireFox

So a customer of mine discovered this problem for me today. I have a pair of radio buttons on some search fields for an AND/OR choice. When he clicked OR (the default is AND) the AND stayed selected and his search threw an error.

Here's a code example:
<input type="Radio" 
name
="search_recipient_group_ao"
value
="And"
checked
>
&nbsp;Or&nbsp;
<input type="Radio"
name
="SEARCH_RECIPIENT_GROUP_ao"
value
="Or" >
So, in IE, this works just fine--only one selection is allowed. In FireFox though, both can be selected at the same time. I'm guessing FireFox is relying on JavaScript for the functionality and is, therefore, case sensitive for form field groups.

No comments: