On Friday, 27 April 2012 10:47:51 UTC+1, DaveK wrote:
input type='checkbox' id='1'
not a legal ID - must start with a letter
That's no longer true as of HTML5, which in this case is just documenting
what browsers already did:
http://www.w3.org/TR/html5/elements.html#the-id-attribute
It
That's what I thought too... but adding CB to the I'd name fixed it.
On Apr 28, 2012 12:35 PM, T.J. Crowder t...@crowdersoftware.com wrote:
On Friday, 27 April 2012 10:47:51 UTC+1, DaveK wrote:
input type='checkbox' id='1'
not a legal ID - must start with a letter
That's no longer true
Try it passing cb1 into a function as cbValue and then $(cbValue).checked...
On Apr 27, 2012 1:46 AM, Wojtek Zadora woj...@studioatrium.pl wrote:
Well, I tested it and in my case having input type=checkbox name=1
value=1 id=cb1
console.log($('cb1').checked); - returns false
$(cbValue).checked returns boolean (true|false) and you compare it to
string:
if( cbState == checked )
simply
strState = (cbState == true) ? checked : unchecked;
-wz
Try it passing cb1 into a function as cbValue and then
$(cbValue).checked...
On Apr 27, 2012 1:46 AM, Wojtek Zadora
Dang it... I knew it had to be something stpid!!! LOL
Thanks! Its 4a here, I'm gonna get some sleep.
On Apr 27, 2012 4:10 AM, Wojtek Zadora woj...@studioatrium.pl wrote:
$(cbValue).checked returns boolean (true|false) and you compare it to
string:
if( cbState == checked )
simply
Well, that didn't work...
input type='checkbox' id='1' name='approved' onclick=saveChange(1);
checked='checked'/
select id='ajMode_1' name='mode' onchange=saveChange(1);
option value='read_write' selected='selected'Send and Receive/option
option value='read_only'Receive Only/option
/select
On 27 April 2012 09:12, Phil Petree phil.pet...@gmail.com wrote:
Its 4a here, I'm gonna get some sleep.
On 27 April 2012 10:04, Phil Petree phil.pet...@gmail.com wrote:
Well, that didn't work...
not enough sleep!
input type='checkbox' id='1'
not a legal ID - must start with a letter
Dave, you're a gentleman and a scholar...
The id was irrelevant because in the original pass I was passing in
this.checked but then someone suggested we allow them to change the mode as
well so then I couldn't use this.checked with an onchange fired via a
select and by then it was wy to late
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
Well, I tested it and in my case having input type=checkbox name=1
value=1 id=cb1
console.log($('cb1').checked); - returns false
console.log($('cb1').readAttribute('checked')); - returns null
While input type=checkbox name=2 value=2 id=cb2 checked=checked
console.log($('cb2').checked); -
10 matches
Mail list logo