Though I use CouchDB-specific JQuery verison, the problem can appear to be not related to CouchDB. There is a list of document id's, and I'm using openDoc
function from the docs to retrieve a document when user clicks the id:
$('.doc_name').click(function() {
var doc_id = $(this).html().toString()
console.log(doc_id);
db.openDoc({
ocId : doc_id,
success : function(data) { console.log(data); }
});
});
The rest of the code (66 lines) is here.
The console.log(doc_id)
outputs a string, but I get an error: Uncaught TypeError: Object #<Object> has no method 'split'
at the point where docId
is processed.
What is the problem? Any suggestions?