I need update data in table without a action send click or submit. For example, when i change input value, i would like save in real time this changes in the database.
My question is, how i can compare if have changes in the form? I read this post, Submitting data without clicking a submit button, but here, the function is executed every 5s, and i need save just only have changes.
HTML
<form id="formos" method="">
Status:<input type="text" class="form-control uppercase" form="">
</form>
JS
$(window).bind('beforeunload', function(e){
if($('#formos').serialize()!=$('#formos').data('serialize'))return true;
else e=null; // i.e; if form state change show box not.
});
Aucun commentaire:
Enregistrer un commentaire