[thelist] opposite of checked="checked"

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Tue Jun 21 15:13:48 CDT 2005


	With client scripting, it's quite possible if you give them a
button or link that triggers this code:

var buttonSet = document.forms[0].buttonName;

for(var i=0;i<buttonSet.length;i++) {
  buttonSet[i].checked = false;
  }

-----Original Message-----
From: thelist-bounces at lists.evolt.org On Behalf Of Jeff Howden

Brian,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Brian Cummiskey
> 
> I have a form with a bunch of radio buttons among other
> form elements, where, on page load, i want to basically  re-set all 
>the radio buttons to NOTCHECKED. 
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

Actually, as radio buttons are mutually exclusive, there really isn't
such a thing as a group that doesn't have one checked.  I know that HTML
and most browsers allow you to define a group without one of them
checked, but therein lies the rub.  What if the user decides they want
to return the group back to its default state without resetting the
form?  Unfortunately for them, it's not possible.  However, starting out
with one always checked removes this issue.

 [>] Jeff Howden
     jeff at jeffhowden.com
     http://jeffhowden.com/





More information about the thelist mailing list