Linked Questions

0 votes
2 answers
556 views

Can someone explain me how to do a JSONP call like I'm five? [duplicate]

I already have a .json object in a server. It is correct and has no syntax errors (valid json). I want to call this object through JSONP because it resides in a server different from my app's. I ...
JZweige's user avatar
  • 731
0 votes
1 answer
284 views

Jquery ajax response says "Unexpected token ':'" (using jsonp as datatype) [duplicate]

I have a demo webserver written in Python Flask and I'm making ajax call to this server through jquery using jsonp. The url returns json as response but script is unable to parse it as json. The ...
Program Questions's user avatar
-1 votes
1 answer
188 views

Why is my Ajax Request Containing dataType: "jsonp" erroring? [duplicate]

I have the following Ajax call: var baseurl = Office.context.mailbox.restUrl; var getMessageUrl = baseurl + "/v2.0/me/messages/" + rest_id + "?$select=SingleValueExtendedProperties&$...
BigDataFiles's user avatar
0 votes
1 answer
37 views

issues reading data using $http.jsonp [duplicate]

I have the following code: var url = 'http://someURL?arg1=test&arg2=test&callback=JSON_CALLBACK'; $http.jsonp(url) .success(function(data){ console.log(data.found); }); I get a status ...
CodeMilian's user avatar
  • 1,280
11556 votes
39 answers
3.9m views

Which JSON content type do I use?

There are many "standards" for the JSON content type: application/json application/x-javascript text/javascript text/x-javascript text/x-json Which one do I use, and where? I assume ...
Oli's user avatar
  • 238k
2465 votes
10 answers
606k views

What is JSONP, and why was it created?

I understand JSON, but not JSONP. Wikipedia's document on JSON is (was) the top search result for JSONP. It says this: JSONP or "JSON with padding" is a JSON extension wherein a prefix is specified ...
Cheeso's user avatar
  • 191k
9 votes
5 answers
20k views

Ajax Web Service Call - No 'Access-Control-Allow-Origin' header is present

Heyya, I know this question has been asked before and I have read each and every answer of every single question here but still can't seem to get my project working properly. My scenario is a bit ...
user avatar
3 votes
1 answer
16k views

jQuery AJAX to access REST API JSON data

I created a REST API in my node.js, express.js application on http://localhost:3000/api/kfc. JSON data is available on it. The function that creates it... router.get('/kfc', function(req, res, next) {...
Rahul Chawla's user avatar
1 vote
4 answers
9k views

Bind country names to drop down list using jquery

Hi I have a web service which returns data in json format. I am not able to bind the country names and the country code returned from web service. My code is <script type="text/javascript" src="...
user1778878's user avatar
18 votes
2 answers
2k views

Trigger an event to private channel in react app

I want to trigger an event to pusher private channel and my server side language is laravel I reviewed a lot of resources, but I did not find a comprehensive approach which covers both the server ...
Bakhtiar's user avatar
  • 661
0 votes
4 answers
5k views

Ajax call on different server

I am sending ajax call on different server using script mentioned below. $(document).ready(function() { var uniqcod=$(".piczhu-widget").attr('id'); $.ajax({ url:'File Path...', ...
Sid Connar's user avatar
0 votes
2 answers
2k views

Ajax call using jsonp not working, "Uncaught SyntaxError: Unexpected token"

Problem I'm working with a open data, city API for river levels, but when I make my ajax call using jsonp I receive an error for Uncaught SyntaxError: Unexpected token < which doesn't appear to be ...
Andrew Nguyen's user avatar
0 votes
1 answer
3k views

Error parsing JSON string

I am having difficulty parsing a json string that appears to be valid json. My code is the following. I'm trying to grab some simple json from a URL. import urllib2 import simplejson req = ...
codingJoe's user avatar
  • 4,833
1 vote
1 answer
4k views

Google Places API - Uncaught SyntaxError: Unexpected token : [duplicate]

I've been researching this for over an hour, and can't find a solution that works. My js: var googleUrl = 'https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Vict&types=geocode&...
gwalshington's user avatar
  • 1,446
2 votes
2 answers
275 views

why this URL is not coming under same origin policy?

What I have learnt about JSON-P (from JSON-P VS JSON and wikipedia) is - JSON-P is invented to overcome the same origin policy of browsers and load JSON objects from another domain. There is a post on ...
tusar's user avatar
  • 3,404

15 30 50 per page