jsonp

jquery - jsonp overwrite callback get parameter

I'm writing a dynamic js that should send a request to an action, that is defined in the href attribute in a link. The link look like that: <a href="module/action?callback=MyCallback">show something</a> As you can see the link has a get param named callback. That is defined, because the request method should be as generic as possi...

Does JSONP require server modifications?

I understand that jsonp is a technique to get around the same origin policy. You basically refer to your json serving server endpoint in a script tag, because script tags are exempt from the SO policy. My question is: Assuming a server has an endpoint that serves up json, are there any modifications necessary on the server to make use...

Static JSON files over CDN via JSONP

I have a large amount of static/rarely changing data in JSON format. To improve my ASP.NET MVC application performance, I would like to move them to a CDN (Amazon Cloud Front). However when I do that, the cross domain policy kicks in and jQuery makes a HTTP OPTIONS method call instead of HTTP GET and Amazon denies the requst with "403 ...

Add data to couchdb with jsonp response

Is there a way add data to a couchdb that runs on another domain and get back an response whether the operation was successfully or not? I know couchdb supports jsonp callback but can I add data with this approach? ...

JQgrid With Jsonp

Hi Guys, Does any one use JQGrid with JSONP. My Json in from seperate webapp and hence i am consuming using $.get with datatype JSONP. I browsed through the JQgrid samples and documentation and there is no JSONP sample. I replaced the url:'http://services.xxx.com/xxxx/json',datatype: "jsonp" , On the document ready the jsonp request h...

getJSON function always returns null

Hello all I am trying to make a get http request using jquery getJSON function. I have implemented it like this... <script type="text/javascript"> $(function(){ $("#query").keyup(function(event) { keyword = $("#query").val(); $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&amp;tagmode=any&amp;...

Any dedicated servers that serve up JSON?

I'm looking to retrieve json from a dedicated server. It will be used to verify client to server communications in my Ajax monitor application. [EDIT] LOL! Even I couldn't of begun to answer this vague question. Sorry was in a rush when asking question. Context: The ajaxMonitor program wraps the JQuery.ajax function. It is a plug-in...

Modify HTTP Headers for a JSONP request

Hello, I am using jquery to build a request to the Twitter Search API. I am using jsonp, as is needed for cross-domain requests. However, the Twitter API specifies that you should set a unique User-Agent for these requests, and limits your requests if you do not. The problem is, I see no way of setting this header via jquery. This is t...

Why does Firefox waits until a javascript function is finished to start another function?

Hi, we are developing a web application using GWT in the front end. In GWT we make calls to the server by appending javascript code as stated below: public native static void call(int requestId, String url, ICall handler) /*-{ var callback = "callback" + requestId; //Create a script element. var script = document.createE...

Ajax query to my webservices is returning xml in my json

Hi I am having this exact problem as raised in this question http://stackoverflow.com/questions/1121559/asp-net-json-web-service-always-return-the-json-response-wrapped-in-xml It's late and I have been sitting in this chair for 10 hours now trying to get ajax and json to work and all I got was deeply frustrated. So does anyone know ...

Ajax query to my webservices is returning xml in my json - Part 2

Hi It's me again (previous question) I am still having problems with json and xml being returned from an ajax call. I have written a webservice in MonoDevelop version 2.2 to return my json. [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string getLocationJ(){} Which returns:- JavaScriptSerializer js = n...

[JQUERY - JSONP] webkit based browser interpretate the json as a script

hi guys! im just tryin to get my zootool items via js to push them in my blog's footer...but with no success. here's the code im using (jquery framework) jQuery(document).ready(function($) { //first try var url = "http://zootool.com/api/users/items/?username=USER_NAME&amp;apikey=API_KEY&amp;jsonpcallback=?" $.getJSON(url, function(data...

jsonp issue when it runs out of visual studio (on server)

I am having issues using jsonp to do some cross domain ajax calls. It is pretty basic code that works in visual studio but once I deploy it on our staging server I get some odd behavior. Data from httpfox: From visual studio the query string looks like this callback jsonp1280451715954 _ 1280451717305 x "Testing" With ...

How to poll for updates with JSONP?

I have a Web server that updates its data once per minute, and want to make that data available to clients of all types. In order to reduce bandwidth, I set up the PHP script to support conditional GETs, using IF-MODIFIED-SINCE and/or IF-NONE-MATCH. The idea is that clients can poll every 30 seconds and thereby be sure that they won't ...

Cross domain basic authentication using jQuery

Hi, Here is my problem: I'm developing a system that can be polled to retrieve dynamic data. It's in Grails, and when I do a request on a certain controller action, say "http://localhost:8080/foo/bar", a JSON list is returned containing the latest data. For added security and functionality, I protected my page using Spring Security (Gr...

How to pass Object context to jQuery.ajax JSONP callback?

I run into problems to pass a javascript object context into the callback handler of a JSONP ajax request, when the ajax provider predefines its callback. (Flickr is the service provider). I'll give a simplified example: function Person(anId) { this.name; this.id = anId; var self = this; this.loadName = function() { $.ajax({ ...

JSONP with large request URI

Hi, I need to be able to make AJAX calls to a server other than the originator of a web-page (both servers are trusted). To be more specific, I have server1 that hosts a GWT application which then communicates with service provider on server2. The possibility to have server1 and server2 on different hosts is a business requirement. CORS ...

Javascript widget (similar to Facebook Like) script vs Iframe approach

When building a social bookmarking button widget for usage in other websites there are a few challenges. We just recently opensourced the clientside aspects of this. (blog post here: http://www.mellowmorning.com/2010/08/03/creating-your-own-diggfacebook-liketweetmeme-button/) Basically the goal is to replace the chosen elements love it ...

Specifying a callback in jQuery.ajax to OpenCalais SemanticProxy service

Hi all, I'm trying to query the OpenCalais service semanticproxy.com. Unfortunately, their url format is as follows: http://service.semanticproxy.com/processurl/APIKEY/jsonp:handler_function/http://en.wikipedia.org/wiki/Germany notice that the function callback, is not in a callback=? parameter, but rather follows the response format...

GWT JSON cross-site request fails

imo i did everything according to the tutorial here Googles x-site /** * Make call to remote server. */ public native static void getJson(int requestId, String url, StockWatcher handler) /*-{ var callback = "callback" + requestId; // [1] Create a script element. var script = document.createElement("script"); ...