I just started exploring couchDB and ran into this problem. I am trying to access some stuff on my newly created couchone.com database. I just want to learn how to fetch the names of the databases I have created using an ajax call from a client browser running on a local pc.
(3) I see no way to access the returned data in my program. It is not in the DOM and there is no variable I can find that contains the response data.
Now if I change the ajax dataType request to just json
dataType: 'jsonp', to dataType: 'json',
(1) the success handler fires
(2) BUT NO is data returned
(3) and I get this in response headers
HTTP/1.1 200 OK Server: CouchDB/1.0.2 (Erlang OTP/R14B)
Date: Sun, 30 Jan 2011 22:55:05 GMT
I think jsonP is required because this seems to be a cross-domain request. But either I am missing something or perhaps CouchDB is not setup to handle the callback processing required by jsonp requests. (see: http://remysharp.com/2007/10/08/what-is-jsonp/)
Any help, advice, beer appreciated....
Also, I can not find any examples or documentation for:
jquery.couch.js (the jQ plugin)
couch.js (that ships with the couchDB installation).
Pointers to docs/examples much appreciated.