javascript - AJAX: only error callback is been fired -


i have declared success , error callbacks, in case of status code 200 calls error callback only.

i have been making curl call other php file inside registry.php.

here tried:

$.ajax({   type: "post"   ,data: {     action: "blah"     ,mobileno: that.mobno     ,token: that.key   }   ,url: "http://90.8.41.232/localhost/registry.php"   ,cache: false   ,datatype: "json"   ,success: function (response) {     console.log("success");   }   ,error: function () {     console.log("error");   } }); 

i have read in documentation don't have call success callback explicitly, hope it's correct.

any idea how call success callback when 200 status code.

response hope help, copied chrome console, not printed console.log().

bort: (statustext) always: () complete: () done: () error: () fail: () getallresponseheaders: () getresponseheader: (key) overridemimetype: (type) pipe: () progress: () promise: (obj) readystate: 4 responsetext: "{"success":"mobile no 9535746622 approved"}      {"report":true}" setrequestheader: (name,value) state: () status: 200 statuscode: (map) statustext: "ok" success: () then: () 

as have mentioned making curl call other php, happens whenever make curl call have return response of curl client. transfer return value of curl call, have set option curl_setopt($curl,curlopt_returntransfer,true);. sort problem. hope so.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -