jsonp

JSONP To Acquire JSON From HTTPS Protocol with JQuery

Hi Everyone! I'm trying to acquire a JSON which is being sent from an https secure site, The client was hoping not to use any Server-side languages (the whole thing in Javascript) I've read that I must use JSONP in order to load a JSON from a secure site, when using the .ajax function from Jquery. My first question would be what for...

Meaning of SOP (same origin policy)

What is the real meaning of SOP (Same Origin Policy)? I know it means that the Javascript code from one origin cannot accuess resources from another origin. But what exactly does the word "resources" mean? For example: Javascript code can access IMAGES from another site. Javascript code cannot make ajax request to another side. ...

JSON List of Tags/Values

I am working on a project that requires an object to have multiple values. For instance, a list of 'things' all with a name but each thing also has another category, "Tags" with could include things like round, circle, ball, sport, etc. all words describing what the 'thing' is. I am trying to define this in JSON but I keep running into e...

can any one explain me what is JSONP in layman terms

I known JSONP is (JSON padding) . I Know what is JSON and using it in $.getjson in jquery is also known But using jsoncallback cannot be understood and what is JSONP ...

How can I securely accept form data in a jsonp request within my mvc app?

I have a need to accept form data from other web sites to a central MVC application. The form data is just strings of name value pairs and they vary from site-to-site. I plan to concatenate all values and delimit them with a special character. Up to this point, I think I can do this with a JSONP type request using AJAX. What I'm conc...

How to build a ASPX proxy page for JSONP calls

I have a page on the local intranet that provides information in JSONP format and want external users to be able to use that page for AJAX calls. For this I want to write an ASPX proxy page that passes the client request to the internal page (on another server) and then sends the unaltered response to the external client. What would be...

How to make a jsonp POST request that specifies contentType with jQuery?

I need to make a jsonp POST request with the content type 'application/json'. I can get the POST request to the server like this: jQuery.ajax({ type: 'POST', url: url, data: data, success: success, error: error, async: true, complete: complete, timeout: TIMEOUT, ...

Securing JSONP?

Hi, I have a script that uses JSONP to make cross domain ajax calls. This works great but my question is, is there a way to prevent other sites from accessing and getting data from these URL's? I basically would like to make a list of sites that are allowed and only return data if they are in the list. I am using PHP and figure I might ...

JQuery JSONP cross domain call not doing anything

Whenever I do a JSONP call through jquery to any page I set up (either locally or on my server) all I get is the silent treatment. Firebug reports 200 OK and the response looks ok. I setup alerts boxes to popup on success or failure but neither appears. It doesn't seem to matter what url I use, nothing pops up. BUT if I use the twitt...

Get LatLon from Google with Mootools Request.JSONP

Hi, I am trying to fetch the LatLon data from a request to Google. The Request.JSONP request works fine and returns the data perfect, but at the onSucces it returns a 'Invalid label' error. Here is my script: var G = {} var googleURL = 'http://maps.googleapis.com/maps/api/geocode/json?address='; G.google = function(id){ var addre...

Google Elevation API with AJAX?

Hi, I am trying to use the Google Elevation API with the getJSON function of JQuery. I am using this code which is using JSONP : jQuery.getJSON("http://maps.googleapis.com/maps/api/elevation/json?locations=23.444,45.4545&sensor=false&jsoncallback=?", function(json){ alert("a"); }); I can see in Firebug that the GET reque...

Test jsonp rest app response using httpbuilder

Hi I'm trying to build up a rest Service which provide JSON response. Yesterday i figured about what is JSONP, why to use it an so and so. Today i would like to make some test with my new version of my service. To test it, i use HTTPbuilder. But i can't get it working correctly. Here is the start of my test: def client = new RESTClient...

Do cookies work when accessing a remote script with jsonp?

Hello, i use jsonp to post a form to a remote script. the code is something like this: $.ajax({ type: "get", datatype: "jsonp", url: 'http://other-domain.com/process_form.php?param1=x&' + $("#gs_vote_form").serialize(), data: $("#gs_vote_form").serialize(), success: function(data) { alert('form submitted successfully...

How to create in php a search.json twitter-like

Hi, I've made on my website a search.php file that produce a JSON string, helping me to use real-time ajax for my apps. But now, I'd like to open it as an API to others, but I discovered that $.get $.getJSON $.ajax doesn't allow to use my search.php file from other servers/domains. How can I do to transform my php search into a search...

Caching of static contets of the SmartGWT app

I'm developing app with SmartGWT framework which gonna work through ssl-connection. SmartGwt libs are big enough, and using of https prevents caching. Is there any way to use JSONP to access static content of SmartGwt app via http? Or maybe you can suggest any other way of static content caching in this case? Thanks ...

pass mysql datatable name in autocomplete jsonp

Hi, I am using jQuery UI autocomplete and I am relatively new to jQuery and JSON. Below is my code. I was wondering if it is possible to specify the field name and data table name inside the callback url so that the php file grabs it later. I have many input box with different names and ids which need to have autocomplete. Each input box...

Safari caches JSONP requests locally

I have a page that makes the same JSONP request multiple times in a single page load. In most browsers this works fine, but Safari caches the response locally until such time as the page is reloaded. Even when I send back a Cache-Control: no-cache header on the response. consider the following example code: var plcbCnt = 0; var plcb ...

twitter search api with jquery error

I need to request a twitter search with jquery using twitter api. After read documentation I write this code: $.getJSON("http://search.twitter.com/search.json?callback=myFunction&q=stackoverflow"); function myFunction(r) { console.log(r); } search.json Failed to load resource> When the page is executed, Google Chr...

Problems Rendering Remote Events using JSONP in FullCalendar

I'm trying to load a json events feed into the FullCalendar jQuery plugin, however, I don't understand how to pass the data into FullCalendar. The url is called, and the JSON object is available inside the eventHandler function. The code below attempts to pass the resulting data into a global variable (which, doesn't feel right), which ...

How to chain JSP response to Servlet request

I have a situation where I have to generate a lot of HTML and then return it as a string JSONP style. So the eventual HTTP response will actually be javascript text like this: myglobaljavascriptcallbackfunction('<HTML here>'); Since the HTML is complex, the only sane way to construct it is with a JSP. So what I would like to do is take...