Skip to content

Instantly share code, notes, and snippets.

@netsuite
Created December 13, 2013 23:23
Show Gist options
  • Save netsuite/7953323 to your computer and use it in GitHub Desktop.
Save netsuite/7953323 to your computer and use it in GitHub Desktop.
ajax cross domain jsonp call
// Note:
// we have to rap the response like this:
// response.write(callback + "(" +JSON.stringify(searchresults) +")");
jQuery.ajax({
url: 'https://',
dataType: 'jsonp',
crossDomain: true,
success: function(data) {
console.dir(data)
},
error: function(e) {
console.log(e.message)
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment