views:

48

answers:

1

Hi there,

I'm trying to modify CouchDB's JS API to work asynchronous, but there is an error I cannot solve:

Please find my JS API find at pastebin. If I call (new CouchDB("dbname")).allDocs(function(result) {console.log(result)}) (line 193) I get an error because the okCallback function is not defined in the callback function.

I don't know why; it should be defined in this scope..

Any hints are very welcome!

Cheers, Manuel

+1  A: 

designDocs takes okCallback as a parameter. You are not passing a parameter when you call the function. Hence, the value is undefined.

VoteyDisciple
I'm so bloody stupid.Sorry, my example is wrong.I tried this call instead `(new CouchDB("dbname")).allDocs(function(result) {console.debug(result)});`
Manuel