Access cross-domain data with AJAX using JSONP, JQuery

My JQuery skills are a bit non existent so you can expect quite a bit of stuff about it.  I’ve run into the

XMLHttpRequest cannot load  …. not allowed by Access-Control-Allow-Origin.

I do have my NodeJS server returning JSONP data but didn’t really know how I am suppose to call it from JQuery.

Used the two links below and came up

  dataType: 'jsonp',
  jsonp: 'callback',
  url: 'API url?callback=?',
  success: function (data) {

The data that comes back will already come back as JSON Object data so no need to do a JSON.parse.


This entry was posted in jQuery and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s