Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 65047 invoked from network); 22 Sep 2010 13:10:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Sep 2010 13:10:44 -0000 Received: (qmail 49609 invoked by uid 500); 22 Sep 2010 13:10:42 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 49381 invoked by uid 500); 22 Sep 2010 13:10:39 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 49373 invoked by uid 99); 22 Sep 2010 13:10:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Sep 2010 13:10:38 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bichay@gmx.net designates 213.165.64.23 as permitted sender) Received: from [213.165.64.23] (HELO mail.gmx.net) (213.165.64.23) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 22 Sep 2010 13:10:33 +0000 Received: (qmail invoked by alias); 22 Sep 2010 13:10:11 -0000 Received: from ulmg-d9bea91f.pool.mediaWays.net (EHLO [192.168.1.33]) [217.190.169.31] by mail.gmx.net (mp043) with SMTP; 22 Sep 2010 15:10:11 +0200 X-Authenticated: #3458945 X-Provags-ID: V01U2FsdGVkX1/yqDVB7r/ygEG7qKFxDx3STsWwV6VBjt+kT39z5K PIUJlEy4jjrf2P From: Tom Bichay Content-Type: multipart/alternative; boundary=Apple-Mail-14--236351235 Subject: Continuous Feed usage with CouchDB Date: Wed, 22 Sep 2010 15:10:10 +0200 Message-Id: <466FBFC0-E543-41F4-AD11-A8CD217F3C91@gmx.net> To: user@couchdb.apache.org Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) X-Y-GMX-Trusted: 0 --Apple-Mail-14--236351235 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, 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). With: $.ajax({ url: = "http://app264565.heroku.cloudant.com/geocha/_changes?filter=3Dchannel/mes= sages_for&include_docs=3Dtrue&feed=3Dcontinuous&channel=3D"+geocha.channel= Id, dataType: "jsonp", jsonp: "geocha.chat.stateChanged" }); where "geocha.chat.stateChanged" 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 =3D $.ajax({ url: = "http://app264565.heroku.cloudant.com/geocha/_changes?filter=3Dchannel/mes= sages_for&include_docs=3Dtrue&feed=3Dcontinuous&channel=3D"+geocha.channel= Id, dataType: "jsonp", jsonp: "geocha.chat.stateChanged" }); connection.onreadystatechange =3D geocha.chat.stateChanged; 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. Thanks Tom --=20 BICHAY IT [bi:shay] IT | Consulting | Development Tom Bichay Freelancer Kammachergasse 2 89073 Ulm 0151 - 20669066 tom@bichay.de | bichay@gmx.net www.bichay.de --Apple-Mail-14--236351235--