couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Unkovsky <oil.cray...@gmail.com>
Subject Re: jquery and trailing \n
Date Thu, 18 Jun 2009 14:16:03 GMT
2009/6/18 francisco treacy <francisco.treacy@gmail.com>:
> However from my html page it doesn't... I have the infamous problem of
> trying to make an ajax request to another host (uncaught exception:
> Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)).

Usual way to get response from server (as jquery.couch.js does) -
xmlhttprequest, won't let you have response from another domain.
jquery does trick for this -- includes <script> tag, but it
automatically evaluates response as script, which gives you "invalid
label" error.

You should either use couchapp, which requires a command "couchapp
push" to update attachments (and all design document) after every
change, or setup some proxy like nginx to serve your static file from
disk and forward other requests to couchdb.

May be the other thing could be done - to make option "enclose json
response in parens" for possibility of cross-domain requests to
couchdb, which otherwise impossible, as far as I can see.

Mime
View raw message