jquery - my json ajax call return me nothing in the callback, but the data in network -
i trying ajax call external json localhost, when call done expecting see success data console.log, i'm nott seeing it.
in network instead see xhr data, i'm doing wrong?
<script> $(document).ready(function(){ var citrourl = 'http://www.citroen.it/_/layout_citroen_pointsdevente/getstorelist' $.ajax({ datatype: "jsonp", url: citrourl , }).done(function (data) { console.log(data); }); }); </script>
done it's called on success.
try check what's happening:
$(document).ready(function(){ var citrourl = 'http://www.citroen.it/_/layout_citroen_pointsdevente/getstorelist' $.ajax({ datatype: "jsonp", url: citrourl, success: function(data) { console.log('success', data); }, error: function(err, msg) { console.log('err', err); console.log('msg', msg); } }); });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Comments
Post a Comment