couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Bichay <>
Subject Continuous Feed usage with CouchDB
Date Wed, 22 Sep 2010 13:10:10 GMT

I am trying to implement a continuous _changes connection to couchdb (cloudant) with jQuery
from a different domain (that's why I am using JSONP).


          url: ""+geocha.channelId,
          dataType: "jsonp",
          jsonp: ""

where "" is my callback function, I would expect to get invoked each
time the continuous connection gets a new object.

But it does not.

It connects correctly to the correct couchdb server and I can inspect the correct returned
json (even when I am saving new documents), but I am not able to invoke any function for changes.
I tried to append an onreadystatechange event listener:

var connection = $.ajax({
          url: ""+geocha.channelId,
          dataType: "jsonp",
          jsonp: ""

connection.onreadystatechange =;

But as a JSONP-Connection is not a real XMLHttpRequest object that is not possible.

Does anyone know what is wrong with my code?

I tried heaps of different things ($.get, $.getJSON, $.jsonp plugin). But it is always the
same problem.

I just need a way to invoke a function for each new arriving json.

BICHAY IT [bi:shay]
IT | Consulting | Development
Tom Bichay

Kammachergasse 2
89073 Ulm
0151 - 20669066 |

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message