[jQuery] Re: get value of checked checkboxes into a list

2008-03-07 Thread Rafael Soares
I'm trying exactly the same. $(input:checkbox:checked); returns a set of jQuery elements $(input:checkbox:checked).val(); returns the value of the first element in the set. I really wanted to get an array with all the values, or even a string, without the need to iterate over each of the

[jQuery] Re: get value of checked checkboxes into a list

2008-03-07 Thread tlphipps
Gonna have to iterate. jquery selector gives you a jquery object. $(input:checkbox:checked).each() is your friend. On Mar 7, 3:27 pm, Rafael Soares [EMAIL PROTECTED] wrote: I'm trying exactly the same. $(input:checkbox:checked); returns a set of jQuery elements

[jQuery] Re: get value of checked checkboxes into a list

2008-03-07 Thread Mike Alsup
I'm trying exactly the same. $(input:checkbox:checked); returns a set of jQuery elements $(input:checkbox:checked).val(); returns the value of the first element in the set. I really wanted to get an array with all the values, or even a string, without the need to iterate over each of

[jQuery] Re: get value of checked checkboxes into a list

2008-03-07 Thread Dan G. Switzer, II
Rafael, I'm trying exactly the same. $(input:checkbox:checked); returns a set of jQuery elements $(input:checkbox:checked).val(); returns the value of the first element in the set. I really wanted to get an array with all the values, or even a string, without the need to iterate over each of

[jQuery] Re: get value of checked checkboxes into a list

2008-01-18 Thread jeangougou
Updating jQuery to 1.2 gives you all the values, as you can see here: http://docs.jquery.com/Attributes/val else you can use a plugin http://www.malsup.com/jquery/form/#fields pay attention for the result, it might be an array. i haven't checked that yet. Good luck Duncan ha scritto: All, I

[jQuery] Re: get value of checked checkboxes into a list

2008-01-11 Thread James Dempster
$().ready(function() { $('#editOptions').click(function() { alert($('input:checkbox[name=listProductID]:checked')); // returns only the first value, selected or not }); }); untested but should work. Also see, http://docs.jquery.com/Selectors/checkbox