Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

jquery checkboxes

is there jquery checkboxes that get saved to post
without pressing submit
Avatar of Frosty555
Frosty555
Flag of Canada image

Easiest thing to do is put a regular checkbox into your form, give it a unique id attribute, and then use jquery to hook into it's onchange event and issue a $.post() to perform your update.

Alternatively, you can use JQuery UI, which is a plugin/extension of jquery that has a number of UI helpers which do a lot of useful stuff.  JQuery UI includes a checkbox object:

http://plugins.jquery.com/project/ui-checkbox
Could you please explain your requirement in more detail?
ASKER CERTIFIED SOLUTION
Avatar of Proculopsis
Proculopsis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would not design a form that posts data when a checkbox control is activated.  Clients do not expect that.  They expect to be able to check a box, and then uncheck it if they want, before the form is submitted.
Could this be an AJAX question? i.e. submit a behind-the-scene POST request to serialise the change?
Avatar of rgb192

ASKER

thanks.
I was told to do it this way.