Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 78756 invoked from network); 16 Apr 2011 20:41:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Apr 2011 20:41:18 -0000 Received: (qmail 39932 invoked by uid 500); 16 Apr 2011 20:41:16 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 39888 invoked by uid 500); 16 Apr 2011 20:41:16 -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 39880 invoked by uid 99); 16 Apr 2011 20:41:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Apr 2011 20:41:16 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [80.244.253.218] (HELO mail.traeumt.net) (80.244.253.218) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Apr 2011 20:41:08 +0000 Received: from [192.168.178.25] (brln-4d0cc975.pool.mediaWays.net [77.12.201.117]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.traeumt.net (Postfix) with ESMTPSA id 477943C262 for ; Sat, 16 Apr 2011 22:40:47 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: $.couch.db(dbname).list("dbname/listname","viewname") --> 200: Invalid JSON From: Jan Lehnardt In-Reply-To: Date: Sat, 16 Apr 2011 22:40:46 +0200 Content-Transfer-Encoding: 7bit Message-Id: <48D12968-59D2-4805-AA97-75244ECE5A73@apache.org> References: <7F79CD98-57ED-4C60-A7CF-5EEFDAF47739@apache.org> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1084) Good find! :) Fixed in trunk: http://svn.apache.org/viewvc?revision=1094049&view=revision Cheers Jan -- On 16 Apr 2011, at 21:05, Hendrik Jan van Meerveld wrote: > Hi Jan, > > Thank you for the reply. > It seems that the list function does not accept any ajax options. > > The code for list in jquery.couch.js is: > > list: function(list, view, options) { > var list = list.split('/'); > var options = options || {}; > var type = 'GET'; > var data = null; > if (options['keys']) { > type = 'POST'; > var keys = options['keys']; > delete options['keys']; > data = toJSON({'keys': keys }); > } > ajax({ > type: type, > data: data, > url: this.uri + '_design/' + list[0] + > '/_list/' + list[1] + '/' + view + encodeOptions(options) > }, > options, 'An error occured accessing the list' > ); > }, > > and it seems to me that the options are added to the Url and are not mixed > in with the ajax options. > > Is this probably a bug or missing feature in jquery.couch? > Would it be useful when I report it as such? > > For now I'll use $.ajax to get the list. > > Kind regards, > Hendrik Jan > > On 16 April 2011 19:29, Jan Lehnardt wrote: > >> Hi Hendrick Jan, >> >> On 16 Apr 2011, at 18:36, Hendrik Jan van Meerveld wrote: >> >>> Hi all, >>> >>> I'm trying to place a list on a website. >>> The list "design/_list/listname/viewname" works fine and gives me the >> HTML I >>> want. >>> >>> But if I try to put this HTML on my website like this: >>> $db.list("design/listname","viewname", >>> { >>> success: function(data){ >>> $("#sometable tbody").append(data); >>> } >>> } >>> ); >>> >>> I get the error: >>> [object XMLHttpRequest] 200: Invalid JSON: