tags:

views:

26

answers:

1

Hello friends..

i have a field set

<FieldSet>
<legnd>Studnetinfo</legend>
 <intpu type="checkbox">

  and here I am having StudnetId,FristName,lastname textboxes

</Fieldset>

 $('#btnAll').click(function() {
            $('#Details input[type=checkbox]').attr('checked', 'checked');
        });

on button click i am checking all checkboxes..and I have other button on the Filedset which i submit..

when I submit clicks I need to send only which ever is checked from Fieldset?

thanks

+1  A: 

Here's a useful link for you and seems to do what you need.

http://drupal.org/node/116548

From that article:

$("input[@type=checkbox][@checked]").each(
function() {
   // Insert code here
  }
);
liquidleaf
That is a very old article, not more `@` on the attribute selectors, a simple `:checked` will work as well :)
Nick Craver