var fm = $('form'); var uc = []; $(':checkbox:not(:checked)', fm).each(function(){ uc.push(encodeURIComponent(this.name) + '='); }); var serial = fm.serialize() + (uc.length ? '&'+uc.join('&').replace(/%20/g, "+") : '');
On Jan 4, 3:47 pm, badtant <[EMAIL PROTECTED]> wrote: > Hi! > > I thinkt the serialize method is great but it seems like it has been > changed to only serialize checkboxes that are checked. Earlier it > serialized all of them and i could use the selector :checked to only > get the ones that are checked if I wanted to. > Now I want to serialize all checkboxes in a form. How can I achieve > that? > > Thanks! > /Niklas