You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Bahadır Yağan <ba...@gmail.com> on 2008/10/03 08:55:24 UTC

Breaking out the ajax same origin

Is there a way in CouchDB to use JSONP described here

http://docs.jquery.com/Ajax/jQuery.getJSON

and here
http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/

It looks like a way to use JSON strings as a function call inside a "script"
tag from html. And it is not bound by the same origin limitation.



-- 
Bahadır Yağan

Re: Breaking out the ajax same origin

Posted by Chris Anderson <jc...@apache.org>.
I would be happy to see such a feature. I'm a little surprised we
don't already have it.

Perhaps the API would be to support a query parameter
callback=functionName, and wrap the JSON for any request with a
callback specified, in:

functionName(
{"json":"here"}
);

This should be doable without touching much code.

Chris

On Thu, Oct 2, 2008 at 11:55 PM, Bahadır Yağan <ba...@gmail.com> wrote:
> Is there a way in CouchDB to use JSONP described here
>
> http://docs.jquery.com/Ajax/jQuery.getJSON
>
> and here
> http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/
>
> It looks like a way to use JSON strings as a function call inside a "script"
> tag from html. And it is not bound by the same origin limitation.
>
>
>
> --
> Bahadır Yağan
>



-- 
Chris Anderson
http://jchris.mfdz.com