Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion stupid checkbox question
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Phil Petree  
View profile  
 More options Apr 26 2012, 4:48 pm
From: Phil Petree <phil.pet...@gmail.com>
Date: Thu, 26 Apr 2012 16:48:22 -0400
Local: Thurs, Apr 26 2012 4:48 pm
Subject: stupid checkbox question

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;
  alert(cbState);

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

}


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.