javascript - Success does not fire after getJson -
i have getjson method in jquery fetches soe location data code
$.getjson('https://nominatim.openstreetmap.org/reverse', { lat: lat, lon: lng, format: 'json', }, function (result) { var dn = result; var phn = localstorage.getitem("number"); var new_dn = json.stringify(dn); $.ajax({ url: 'http://cnn.com/nj.php' , type : "post", data: {phone: phn, location: new_dn }, datatype: 'json', success: function() { alert('success'); } }); });
i want on success code not fire alert
success: function() { alert('success'); }
why so?.
the jqxhr.success(), jqxhr.error(), , jqxhr.complete() callback methods removed of jquery 3.0. can use jqxhr.done(), jqxhr.fail(), , jqxhr.always() instead.
Comments
Post a Comment