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

enter image description here

however still uncaught referenceerror: getjsonp not defined. how should fix this?


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -