1

Help me with my problem,please! I used CouchDB, and i used jquery.couch.js to communicate with a CouchDB server (http://daleharvey.github.com/jquery.couch.js-docs/symbols/index.html) but it's dosen't work(( Start of such script:

$.couch.urlPrefix = 'http://127.0.0.1:5984'
function getAllDBs(){
    $.couch.db('mysecondtest').allDocs({
        error: function(status, id, reason) {alert(status+' : '+id+' : '+reason);},
        success:function(data){
            alert(data);
        }

    });
}
getAllDBs(); 

return an error:

405 Method Not Allowed localhost:5984

I think, it means that the server perceives my request as request about the remote server, but I don't know as to correct it. Please help me and sorry for my bad English))

Brian Mains
  • 50,520
  • 35
  • 148
  • 257

2 Answers2

2

You are falling into a cross-domain issue.

You may consider using couchdb-xd

Abdul Munim
  • 18,869
  • 8
  • 52
  • 61
0

Ajax requests cannot happen cross-server per design. This is of security-reasons.

Jan Dragsbaek
  • 8,078
  • 2
  • 26
  • 46