jsonp

Cross-Origin Resource Sharing (CORS) using JSONP and Web Workers

Hi, I am looking for solution how to get/send the data from/to another domain using JSONP in the Web Workers. Since the Web Workers have not access to the DOM it is not possible to append the <script> tag with the url and callback parameter to the <head> tag from Web Workers. Does anybody know, how to get/post the data from/to another...

Cross Domain requests using JQuery

This is a followup question to the one here Here's briefly what I am trying to do. The File server creates a text file to indicate an end of the process. On a webpage on the Web Server, I loop every x seconds and make an ajax request to find out if the test file exists (ajax request to http://fileserver/files/UserFile.txt) I've tried t...

Can use JSONP in Safari, but not Safari Moble!

Hi, I am trying to get an iphone webapp that uses ajax to work. I have developed the code using the latest Windows 7 version of safari and it works fine. The same code does not work in Safari Mobile for iOS 4... $.ajax({ dataType: 'jsonp', data: "somedata=34", jsonp: 'jsonp_callback', url: 'http://www.siteName/dl.php...

Mootools cross domain, YQL proxy

Hello, I've been trying to make ajax cross domain scripting with YQL as proxy. It works great, but can i somehow change the data format? Im trying to extend the JSONP class like this: http://fragged.org/cross-domain-ajax-calls-via-yql-as-proxy-and-mootools-jsonp_1028.html And im getting data as text/html, but would like it to be as xm...

IE8 -if JSONP array has no last element after a comma ..get error

hello all, My X-site scripting using JSONP encounters error on IE8 but works fine on both firefox and crome... here the returned JSON object passes an array with a comma at the end and no last element ...i.e something like {a,b,c, } ..as you can see the last element is succeeded by a comma and that is what is causing problem on IE. the ...

JSON object is null, even though feed is valid JSON

Help, I'm confused. I just need to get a JSON object into my page. The URL is as follows: http://disqus.com/api/get_forum_posts/?user_api_key=MYKEY&amp;forum_id=MYID&amp;api_version=1.1 If I use the Flickr API URL and the code given in the getJSON example, it works fine: <script>$.getJSON("http://api.flickr.com/services/feeds/photos_...

Error in response in Jquery Ajax request

I have a script which is posting some form data to a Quickbase and I'm getting what the browser interprets as JavaScript error in Quickbase's XML response. Right now, the data is properly being recorded in Quickbase but I can't seem to suppress the parsing error. Additionally, I have no access to server-side languages - just client-side ...

Omit meta-data from oData response

I'm experimenting with writing Javascript/JSONP queries against an WCF oData API. For performance reasons, I'm trying to keep the responses succinct. The default seems to be for the oData endpoint to return uri and type metadata with every returned result. This information can take up a significant portion of response payload. Is there a...

Fetch first element in 'new array' JSONP response with Jquery

I try to keep it simple: Problem: how to fetch the first element (weight here) from the new Array with JQuery Current JQuery: function xyz() { var the_url = 'http://longurl'+encodeURIComponent(searchBox.val()); var x1 = $.ajax({ type: "GET", url: the_url, ...

ASP.NET Generic HTTP Handler (.ashx) supporting JSONP

Can someone show an example of an HTTP Handler that returns JSON and supports cross domain calls. I am using jQuery's getJSON() that sends a request to an .ashx file on my web server. I understand that I need to add ?callback=? to my url in the getJSON() url, but I'm not sure what needs to be done on the server in my ashx file? ...

How to read username and password from http GET in .NET MVC controller?

How can I read the username and password from http GET in .NET MVC controller? I am using a jQuery $.ajax call and I am passing username and password in as a setting. Is this secure? If my server is ASP.NET MVC 2 how can I retrieve the username and password from the request? My end goal is to make a secured jsonp call. here is ho...

JSONP for cross-site bookmarklet guidance

I'm looking to build a cross-site bookmarklet that gets a highlighted word, passes it to a CodeIgniter method (domain.com/controller/method), and returns the definition via a dictionary API. I've got a skeleton working well on a single domain, but I'm looking to expand it to use JSONP cross-domain. But I feel unclear. I know I need to l...

Mootools referring to wrong element?

Here's the logic: - Use JSONP to generate a list of articles - When the user clicks the title, do another JSONP req. and generate the content by replacing the subtitle from the previous request. That's all nice and dandy, but this is what happens: - I click a random article title, content replaces subtitle (works great) - I click a seco...

jsonp comet hanging request causes ugly "loading" status on browsers

I'm using jsonp to do cross-domain comet requests, and the "loading" status is really annoying. Is there any way to suppress this with javascript? For those who are unfamiliar with jsonp, it basically injects a script tag, except in my case, I'm hanging the request on my server without returning the request until a later time. During ...

How does Wowhead.com do item popups across fansites?

If you run a site that links to world of warcraft items, you're probably using the wowhead.com javascript to bring their item popups to your site. See it in action here, mouse over the "King Dred's Helm" link. It will popup Wowhead.com's info. is this just a jsonp callback to their site? I want to implement something like this on my si...

Custom headers with $.ajax type jsnop or json

I have a problem with sending some custom headers to with a jQuery ajax JSON (or JSONP) request. Code looks like this: $.ajax({ beforeSend: function(xhr) { xhr.setRequestHeader("X-VER", VER); xhr.setRequestHeader("X-TIMESTAMP", now); }, type: 'GET', data: null, url: site_uri, dataTy...

if I allow partner sites to republish my RSS feed, will that boost my SEO ranking?

I have a site. Would it help its SEO ranking if I allow B2B business customers to repost the site's blog's RSS feed (I'm thinking of using the partial RSS feed with links back to the site to "read more."), will that boost SEO rankings? What if I (1) give the business customers (They may not be very tech savvy, and therefore, I'd like to...

Is it possible to track JSONP calls to my site, via Google Analytics?

Since it's a lightweight JSONP callback to my site, I don't think there is a way to get standard Google Analytics tracking, unless I'm mistaken? Otherwise I'll have to track on my own, inside my action (asp.net MVC 2 site), correct? What sort of tracking would you do here? ...

What are some things to consider when letting other sites use scripts directly from your site?

I have a jQuery function that runs through the page, finds links to a certain domain, does an ajax call to get some data and crafts a tooltip when the visitor hovers their mouse over the link. Just like wowhead.com/tooltips. What are some things to consider when allowing other sites to include your script files, linked directly from you...

Wiring up JSONP using JQuery and WCF

I'm trying to get a cross domain call to work using JSONP within JQuery. In IE, the alert method never executed. In FF/Safari/Chrome, it's always null. I looked at Fiddler and the result from the WCF method is as I'm expecting, which is: method({"Name":"blah1","Data":"blah2"}); Here's my JavaScript: $.getJSON("http://localhost:560...