jsonp

fullcalendar not showing events

My setup is like this: Based on this example http://arshaw.com/js/fullcalendar/examples/json.html I tried to get my own fullcalendar application working. I replaced 'events: "json-events.php",' with 'events: "http://localhost:8080/CalendarServletTest/HelloWorldServlet",' and changed the dataType of fullcalendar to 'jsonp'. (The Servlet ...

"invalid label" Firebug error with jQuery getJSON

Hi all, I'm making a jQuery getJSON request to another domain, so am making sure that my GET URI ends with "callback=?" (i.e. using JSONP). The NET panel shows that I am receiving the data as expected, but for some reason the Console logs the following error: "invalid label". The JSON validates with JSONLint so I doubt that there is a...

Bing search API using Jsonp not working, invalid label

Struggling with Bing's json request (bing search, not map), I am getting an error back that says 'Invalid Label' My query url is: var bingurl="http://api.search.live.net/json.aspx?Appid=##APIKEY##&query=Honda&sources=web"; $.ajax({ type: "GET", url: bingurl, data: "{}", content...

Jsonp request using jquery to fetch bing web results

using this as a guide: http://msdn.microsoft.com/en-us/library/dd250846.aspx can someone help me with the jquery call? Do I actually pass in the javascript code for the callback, or just the name of the function? BingSearch = function($bingUrl, $bingAppID, $keyword, $callBack) { $bingUrl = $bingUrl + "?JsonType=callback&JsonC...

How to add JSONP support in a .NET 3.5 WCF REST JSON service

I just made a WCF REST JSON service for .NET 4 that uses crossdomainscriptaccessenabled ( http://msdn.microsoft.com/en-us/library/system.servicemodel.webhttpbinding.crossdomainscriptaccessenabled.aspx ) . Unfortunately for me, the service is to be used in Azure, and Azure STILL don't support anything more than .NET 3.5. So, my question i...

jQuery JSONP, only works with same site URLs

I need to make a request to an API which returns json formatted data. This API is on a sub-domain of the domain this script will run off (although at the moment it's on a totally different domain for dev, localhost) For some reason I thought that jsonp was supposed to enable this behavior, what am I missing? Using jQuery 1.4.2 $.ajax(...

What are the differences between JSON and JSONP?

Format wise, file type wise and practical use wise? ...

Jquery getJSON() doesn't work when trying to get data from java server on localhost

The whole day yesterday I've been trying to solve this but it's proven to be very challenging for me. I'm trying to use this JS to get information from a java application I wrote. $(document).ready(function() { $.getJSON('http://localhost/custest?callback=?', function(json) { alert('OK'); $('.result').html(json.description); ...

jquery, jsonp and no success

Hi I have the following jquery in my code$j.getJSON("http://localhost:8080/WWTestHarnessWEB/ReadersToolkitFinalController.htm?jsoncallback=?", {'uID': 1}, function(data){alert(data);}); The json that i am returning looks like the following ({"positiveCount":"0","negativeCount":"999"}) But my alert is never firing. Any idea what i nee...

How to use JSONP to overcome XSS issue?

I have a piece of javascript executing on a jetty server which is sending a XMLHTTPRequest to a scoket on another server(wamp server). The request gets sent to the socket, however the XHR response seems to be getting blocked. I have heard that I can use JSONP to overcome this problem. However as I am new to both javascript and I have ne...

How to make cross-domain AJAX calls to Google Maps API?

I'm trying to make a jQuery $.getJSON call to the Google Maps Geocoding webservice, but this doesn't work because of cross-domain security issues. I haven't been able to figure it out online, but I've read a bit about Google Javascript API or JSONP, but so far no clear answer... Could anyone enlight me? Thanks! ...

Is it possible to use JSONP on the server?

Hi all, I'm stuck on a clients host that has medium trust setup which blocks cross domain requests and need data from a 3rd party domain. I now have the option to use JSONP. I've used JSONP from the client with jQuery to get around the browsers cross domain security and I've used HttpWebRequest in ASP.Net 3.5. Is it possible to use J...

How can I get jsonp to play nice with my class?

This whole jsonp thing is quite confusing... Here is what I want to do: I have a class DataRetriever The class has a method GetData GetData makes a jsonp request with the following code: var new_tag = document.createElement('script'); new_tag.type = 'text/javascript'; new_tag.src = 'http://somesite.com/somemethod?somedata'; // Add th...

JSONP Implications with true REST

From my understanding JSONP can only be achieved using the GET verb. Assuming this is true which I think it is, then this rules out core compliance with true REST in which you should make use of different verbs i.e. GET,PUT,POST,DELETE etc... for different and specific purposes. My question is what type of barriers am I likely to come ...

jersey webservice not returning jsonp

Hi I am trying to create a webservice that will return jsonp. At the moment it is only returning json Here is my code `@Path("/jsonp") public class JsonpWebservice { @GET @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML}) public JSONWithPadding readAllP(@QueryParam("jsoncallback") @DefaultValue("jsoncallback") String js...

Can't get the JSONP workin' with WCF Data Services...

What am I missing here? It seems from all that I read and watched, exposing JSON from a WCF Data Service should be as easy as adding the '[JSONPSupportBehavior]' directive in front of the Service Class. Problem is VS2010 doesn't recognize 'JSONPSupportBehavior'. Is there a reference I am missing? Seemed like, from alll the articles, it w...

Twitter client with JQuery not working in Firefox

Hey guys, I've got a little script that fetches my latest tweets... I use JQuery's getJSON method to fetch my tweets. The script works well with Chrome and Safari but when it comes to Firefox, nothing appears! here's the code: $.getJSON('http://api.twitter.com/1/statuses/user_timeline.json?screen_name=lpdahito&count=3&callback...

JSONP callback method is not defined

I'm trying to get a jsonp callback working using jquery within a greasemonkey script. Here's my jquery: $.ajax({ url: "http://mydomain.com/MyWebService?callback=?", data: { authkey: "temphash" }, type: "get", dataType: "json", cache: false, success: function(data) { console.log(data); } }); in my we...

How to process xml returned from jsonp using jquery?

I use the following jquery to return an xml that resides on the same subdomain: $.getJSON(myurl, function(data) { debugger; alert(data); }); Now whenever I run this in firebug, I get a js error in firebug saying: Missing ; before statement. The data returned looks like this: <?xml version="1.0" encoding="utf-8"?> <string xmln...

jsonp not finding my function

I created an asp.net aspx page. My aspx html side is empty and the codebehind is: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Response.ContentType = "application/x-javascript" Response.Write("jsonFlickrFeed({""items"": [{""tags"": ""portrait""}] })") Response.End End Sub My json q...