How do you get the checked state of a single checkbox?

$('cbID').checked doesn't work...  also tried $F('cbID').checked

in the following function, the alert comes back with "undefined"

cdValue is the id of the checkbox...

function saveChange(cbValue)
  var strState;
  var cbState;

  // get the value of the checkbox
  // we do it here incase this is called
  // from the onchange attached to the select
  cbState = $(cbValue).checked;

  if( cbState == "checked"  )
    strState = "checked";
    strState = "unchecked";

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to