The success
function for some reason is not being called in the following JavaScript code:
$ Ajax ({type: 'POST', url: 'http: //localhost/hf_latest_desktop/st_pages/user_area/acc_buttons/pass_change/pass_change_ajax.php', data: data, data type: 'json', success: work (e) {Console.log (e); if (eStatus == 'success') {Warning (' Your password has been changed! ');} If (eStatus ==' Error1 ') {Warning (' please Fill all inputs! ');} If (E.Stetus ==' Error 2 ') {Warning (' password wrong! ');} If (eStatus ==' error 3 ') {Warning (' Change failed! ');}}});
The php file is being called azak:
& lt ;? Php session_start (); Session_cache_limiter ('nocache'); Header ('End:'. GMDT ('R', 0)); Header ('content-type: application / jason'); $ Position = 'error1'; // for example? & Gt; {'Status':' & lt ;? Php echo $ status; $ AJAX ({type: 'post', datatype: 'text / jason', url: 'myUrl', success: work (data, status) {}, error: function (data, status) {warning (data); Feedback print!}});
Comments
Post a Comment