I have a page with a bunch of groups of checkboxes.
I'm trying to add functionality so the user can do a "check all" and
it would in turn check all the boxes.

I found this via a google search but it's selecting EVERY checkbox on
the page, not just the ones names "state_abbr".
function jqCheckAll2( id, name )
{
   $("INPUT[@name=" + name + "][type='checkbox']").attr('checked',
$('#' + id).is(':checked'));
}
</script>


and...
<input type="checkbox" name="checkAllStates" id="checkAllStates"
onclick="jqCheckAll2( this.id, 'state_abbr' )"/> Check All States

The other groups and correctly names com_id, workgroup_id, etc.. so
why is jQuery checking them?

Thanks!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343751
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to