jsonp

rack-jsonp not working for simple requests but works for .js calls in Rails 2.3

I am using Rails 2.3 and I decided to provide support for JSONP. Created a brand new application. Then ran script/generate scaffold User name:string This is my entire environment.rb RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION require File.join(File.dirname(__FILE__), 'boot') require 'rack/contrib' Rails::Initializer.r...

FireBug and monitoring JSONP cross-domain requests

This question is specific to the Firebug plugin for Firefox. The actual functionality works, but I lost my ability to monitor and debug it in Firebug. I had a website which used JSON to get data. In Firebug, I was able to monitor the JSON requests. It would show me each one of them, the headers, and the data that was returned. I needed...

javascript - Want to access the contents of another domain with ajax?

I'm trying to write a javascript application that loads data from the openstreetmap API (http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6), which is basically just a restful xml api. I'm trying to use jquery to access the XMl. however I get security errors. This is a cross site scripting blocking. How can I access that XML? A...

JQuery, XmlHttpRequest and Status Code 0

Hi All, I've recently been doing some Cross-domain javascript using JSONP, and ASP.NET MVC. The particular Controller action will only respond to a POST request, this is by design. In IE8, I can see (via Fiddler2) that the response is correct, and returning a HTTP 200 response, along with the JSONP javascript. In Firefox, Safari and ...

Return JSON wrapped in a callback function from a WCF REST web service

I have a web service returning JSON, but now I'd like to modify it to allow callers to specify a callback function so the return goes from: JSON DATA to specifiedFunction(JSON DATA); The way I'm returning JSON right now is just by returning an instance of an object and having .NET do its serialization magic, if I change to just returning...

Consuming JSON with JavaScript and PHP

2 short questions. I would appreciate an answer or a pointer to an answered question on SO (I searched before asking :)). I'd like to consume one of the TRYNT's web services that returns a JSON object (like this one for example). Am I right in deducing that if they don't specify JSONP, there is no way I can consume those services from ...

Ajax/JQuery/JSON Forms

Hi all, I've got a form which I need to post the information to an external site, but for some reason I'm getting an error: Error: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "jquery.core.1-3-2.min.js Line: 19"] Source File: jquery.core.1-3-2.min.js ...

jsonp proxy web app I can install?

After getting stuck trying to access another domain with ajax I discovered I'll need to use jsonp. However the web service I'm using doesn't provide jsonp output. No problem, I can write something simple on my own webserver that will wrap the output of their thing with jsonp. However before I reinvent the wheel, is there some exisiting p...

JSONP callback doesn't execute when running at localhost

This is bizarre, I was wondering if anyone could shed some light on why this happened. Basically, I've been pulling my hair out trying to test JSONP out so I can implement a JSON web service that other sites can use. I'm doing development on localhost--specifically, Visual Studio 2008 and Visual Studio 2008's built-in web server. So as...

Jquery-upload-progress cross domain issue. Suspected GET request problem.

Hi, I am doing a site which submits a form to a different server. For upload progress tracking I use: for server side the NginxHttpUploadProgressModule und for client side - jquery-upload-progress. I have tested the setup by submitting the form to the same server and everything worked fine. Submitting to another server doesn't show the p...

Jquery ajax onSuccess event

I am doing AJAX with JQuery but every time the "onSuccess" event must be executed after another AJAX request disconnected. Here is the code: d.ajax({ url: f.options.url.offline, dataType: "jsonp", jsonp: "callback", cache: false, data: { status: "offline", ticket: f.co...

Tricky: Surpress "Loading ..." title in Firefox for JSONP polling

I am working on a jQuery plugin that people can include in their own page. The plugin spawns jobs at a service I am operating which is on a different domain. To breach the domain boundary I am using jQuery's JSONP functionality which works fine for spawning the job. However, I also need to display the "progress" (0 -> 100%). So far my p...

Explanation and usage of JSONP

What is JSONP, why is it needed, and what are some real world examples of it's usage. ...

What is JSON-P & how do you pronounce it?

Related question: Explanation and usage of JSONP. I know what JSON is but what is JSON-P? How do you pronounce JSON-P? ...

How to return the result from JSONP call outside the function?

I have the following function which works great, i used JSONP to overcome cross-domain, wrote an http module to alter the content-type and didn't append a callback name in the url. function AddSecurityCode(securityCode, token) { var res=0; $.ajax({ url: "http://localhost:4000/External.asmx/AddSecurityCode", data: { securityCode: JSO...

How can I use django with JSONP to load content from my other website?

I have two sites written with Django. What I want is to load a content from one site into another. I found out that best choice to do this would be using .getJSON and JSON-P but I have no idea how to put this things (Django, jQuery and JSONP) together. Any help from more expirienced users? EDIT I'm trying to achive an ongoing process ...

How do I process Proxy Digg JSON for use with jQuery?

I'm trying to deal with: "Requests made from Javascript running on your web pages must be proxied to avoid same-origin policy conflicts." I know how to work with the JSON once I've got it. But aside from copy-pasting the JSON results via my browser, I don't know how to localize it for use. ...

How can I query the Best Buy Remix API w/ jQuery?

Here's the code that I've been trying to work with: $.getJSON("http://api.remix.bestbuy.com/v1/products(search=" + escape(searchCriteria) + ")?apiKey=" + hhApiKey + "&format=json&callback=?", function(data) { if(data.error) { alert("I'm sorry, there was an error processing your request."); } else { alert(data); } }); However, ...

Callback not being executed, though request works fine with jQuery getJSON

I am trying to obtain a list of assets (via JSON) inside of a drop using a free drop.io account. Note that I have already looked at the other two questions (question1 and question2) concerning this and neither of them provided a solution. var dropName = escape("greganddonny"); var apiKey = "some key I'm not displaying it h...

Synchronous cross sub-domain POST request with jQuery

I'm trying to do a cross domain POST request and have hit a wall (or two). I can't put a proxy page on the server - so that is not an option. I have researched getJSON, which works great except that I need to POST not GET. Is it possible to do this? If it is not, can someone explain to me how getJSON works and why I cannot make a POST...