javascript - Can't figure out why this ajax request fires two times -
I am working on the snippet of this code, but I can not understand why the Ajax request is firing twice when I Click on the selected button:
$ ('# passwd-nuova'). Valid ({'classeform': 'Form-utenti', 'Empty': 'passwd-nuova'}); If (! Response. Empty] {$ ('# reset') AddClass ('btn-disabled');} and {$ ('(click on', function) (var new_passwd = $ ('input [name =' '( Send_email = $ ('# cb-email') from '' EntamBella ':' utility ',' abrr ':' utility '}) var .prop (' check '); $ .ajax ({cache: incorrect, type : "Post", url: "/ gutenti /", data type: "json", data: {'mod-passwd': true, 'idu': selezionato, 'new-passwd': new_passwd, Send-email ' : Send_email}, success: function (response) {var tab = $ ("# datatable_utenti"). Datasheet Force (); $ ('# modal-reset') modal ('hide'). Tab.fnDraw (); $ (window) .scrollTop (0); $ (document) .JenArt ({tipo: 'success' Msg ('modifica full success', time: 800}); $ ('input'). (Function () {$ (this) .val ('');}); $ ("#dataTable UT Tobby" CompileForm ({'abrr': 'utility', 'nmambebel db': 'admin_tenti', 'nemetebela': 'utility'}); $ (document) .stato (profile, 'base'); Return; }, Error: function () {console.log ("errore async"); $ ('# Modal-reset') modal ('hide'). $ (Window) .scrollTop (0); $ (Document) .genAlert ({tipo: 'error', msg: 'Qualcosa a Atoo starto, repo', time: 800}); }}); Return; }); }});
I tried to disable the button after the call, and did not try to return anything to get out of the function, but nothing is working.
Your $ ('#passwd-nuova'). Blurring
handler binds $ ('# reset'). Click the 'handler' several times.
I am glad that my comment has helped you;)
Comments
Post a Comment