Tuesday, May 4, 2010

HTML Checkboxes.

From the HTML 4.01 specification:
checkboxes
Checkboxes (and radio buttons) are on/off switches that may be toggled by the user. A switch is "on" when the control element's checked attribute is set. When a form is submitted, only "on" checkbox controls can become successful.
I kid you not. If you "uncheck" a checkbox, it will not be submitted to your web application. Your application would need to know what checkboxes were are on the page. If your application generated those checkboxes from a source that it can't reproduce (or doesn't want to, considering how much effort that is), your application can't determine which checkboxes had their values changed from checked to unchecked.

There are two alternatives I know of: use drop-down lists, or make your own checkboxes with JavaScript and images.

No comments:

Post a Comment