jQuery: submit a form when the checkbox is selected

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2010-04-27T14:21:26Z Indexed on 2010/04/27 14:23 UTC
Read the original article Hit count: 248

Filed under:

hi,

I have a form, and I want automatically to update it when I click on a checkbox. This is my current code:

$('.option img').click(function() {
     $("#views-exposed-form-Portfolio-page-1").submit();
});

However, the selected checkbox is not stored before the form is submitted, and so the selection has not effect.

thanks

© Stack Overflow or respective owner

Related posts about jQuery