I have a checkbox and as soon as it is clicked I’m going to submit an AJAX request to update a field. However, first I’d like to call confirm to make sure that this is what they want.
This does not work:
$(".mycheckbox")
.live("click",
function(){
if(!confirm("Sure about that?")){ return false; }
$.post($(this.form).attr("action")+".js",
$(this).serialize()+"&_method=put",
null,
"script");
}
)
instead of
return false: