Call Ajax Each Time When A Checkbox Is Checked In Php
I have a page in which there are some checkboxes.Right now when ever i press submit btton, i m calling ajax.but i want the ajax to be called when any of the checkboxes is checked.
Solution 1:
Just change your event, and handle click on your checkbox :
$( "[type=checkbox]" ).change(function () { ...
Solution 2:
Use the change event for a changed checkbox and use the prop for checking if he is checked.
$("[type=checkbox]").change(function () {
if(this).prop('checked')
{
// textbox is checked
}
});
Post a Comment for "Call Ajax Each Time When A Checkbox Is Checked In Php"