[jQuery] Re: Getting form field values

2009-08-20 Thread mkmanning
I'm assuming you want the current value of the checked checboxes. Just use .serialize() var inputs = $("input[name^='day']").change(function () { console.log(inputs.serialize()); }); the output of serialize() is a query string, just split on '&' for an array of key=value that you can then proc

[jQuery] Re: Getting form field values

2009-08-20 Thread Nathan Bubna
You could use my Values plugin ( http://plugins.jquery.com/project/values ) and do: $(document).ready(function() { $("input[name^=day]").change(function () { var all = $('input[name^=day]').values(); for (var day in all) { if (all[day] !== null) {

[jQuery] Re: Getting form field values

2009-08-20 Thread ak732
You could do it in a loop using each(): $("input[name^='day']").each(function() { if ($(this).is(":checked")) { // do whatever } }); On Aug 19, 5:20 pm, blcArmadillo wrote: > I have a simple set of checkboxes: > > Sun name="day2" type="checkbox" value="mon" /> Mon type="checkbox" va