javascript - jsonp callback function not recognized -
i've ajax called like
$.ajax({ url: geturl, type: 'get', crossdomain: true, data: { url: url, token: token }, datatype: 'jsonp', jsonpcallback: "getjsonp", success: function () { /* */ }, error: function() { console.log('failed!'); } });
and jsonpcallback
function
function getjsonp(data) { console.log(data.content); }
on dev console, see it's returned properly
however still uncaught referenceerror: getjsonp not defined
. how should fix this?
Comments
Post a Comment