jquery.couch.js

135 views
Skip to first unread message

goog cheng

unread,
May 9, 2012, 5:43:35 AM5/9/12
to couc...@googlegroups.com
Hi,   all !    i  code below ,  it  doesn't work  out of couchdb  ,  why?   

<script type="text/javascript">
doc =  { name: "John", location: "Boston" }
document.write(doc.name);
db.saveDoc(doc,{
        success: function() {
        alert("Hello World!");
        },
    });
</script>

Benoit Chesneau

unread,
May 9, 2012, 6:33:01 AM5/9/12
to couc...@googlegroups.com
because of different origin. Until CORS isn't in couch it won't work.
Though I heard it would come soon.

- beneoit

UnclePhil

unread,
May 10, 2012, 3:24:03 AM5/10/12
to CouchApp
Sorry Benoit,
This cannot be CORS, because its localhost call And you know that
with the standard replication of Couchdb it's totally obsolete

But it seems that ..

db.saveDoc(doc,{
        success: function() {
        alert("Hello World!");
        },  <<<<<<<<<<<<<<<<<<<< this coma annouce a new parameter
who's missing here
    });

Ph Koenig
aka Unclephil
tc.unclephil.net


On May 9, 11:43 am, goog cheng <googch...@gmail.com> wrote:
> Hi,   all !    i  code below ,  it  doesn't work  out of couchdb  ,  why?
>
> <script type="text/javascript">
> doc =  { name: "John", location: "Boston" }
> document.write(doc.name);
> db = $.couch.db("http://chengjie:cheng...@127.0.0.1:5984/contacts");

Benoit Chesneau

unread,
May 10, 2012, 3:28:17 AM5/10/12
to couc...@googlegroups.com
On Thu, May 10, 2012 at 9:24 AM, UnclePhil <koeni...@gmail.com> wrote:
> Sorry Benoit,
> This cannot be CORS, because its localhost call  And you know that
> with the standard replication of Couchdb it's totally obsolete
>
> But it seems that ..

Oh indeed. I only saw the http:/... I didn't figure it was a localhost call...

- benoit
Reply all
Reply to author
Forward
0 new messages