Skip to main content
Quoted inline sample HTML. Minor edit: grammar/spelling/case/punctation/etc.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

anywayAnyway, you propablyprobably need somethignsomething like this:

 var val = $('#c_b :checkbox').is(':checked').val();
 $('#t').val( val );

This will get the value of the first checked checkbox on the page and insert that in the textarea with id='textarea'id='textarea'.

Note that in your example code you should put the checkboxes in a form.

anyway, you propably need somethign like this:

 var val = $('#c_b :checkbox').is(':checked').val();
 $('#t').val( val );

This will get the value of the first checked checkbox on the page and insert that in the textarea with id='textarea'.

Note that in your example code you should put the checkboxes in a form.

Anyway, you probably need something like this:

 var val = $('#c_b :checkbox').is(':checked').val();
 $('#t').val( val );

This will get the value of the first checked checkbox on the page and insert that in the textarea with id='textarea'.

Note that in your example code you should put the checkboxes in a form.

Source Link
Pim Jager
  • 32.2k
  • 17
  • 74
  • 100

anyway, you propably need somethign like this:

 var val = $('#c_b :checkbox').is(':checked').val();
 $('#t').val( val );

This will get the value of the first checked checkbox on the page and insert that in the textarea with id='textarea'.

Note that in your example code you should put the checkboxes in a form.