From user-return-5741-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sun Aug 02 03:47:03 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 34567 invoked from network); 2 Aug 2009 03:47:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Aug 2009 03:47:03 -0000 Received: (qmail 95077 invoked by uid 500); 2 Aug 2009 03:47:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 94991 invoked by uid 500); 2 Aug 2009 03:47:06 -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 94981 invoked by uid 99); 2 Aug 2009 03:47:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Aug 2009 03:47:05 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.217.209 as permitted sender) Received: from [209.85.217.209] (HELO mail-gx0-f209.google.com) (209.85.217.209) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Aug 2009 03:46:57 +0000 Received: by gxk5 with SMTP id 5so4307047gxk.11 for ; Sat, 01 Aug 2009 20:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=/vG2tKcWnvyo9NjbBmhl+7EqSnhLKpdrfThTB4fdxPA=; b=GsCh84o8dzCudvNzIlyGHuOG/l0nDl6oBpXLr/rE4mMUv6truIlKDnRDd0ak2V5PC9 3MvxDLNGei8NqZ+HzR8Vm9fu+iDWsd9WrvAgODdJrvhfABn4y9B2lERmoFAd5cHsIw19 vCwAk3LXh+BqtEGIeNCUXqDufya7ncsEpgJUQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=OUrqbaAI95VX5l6WJumQ92ENl73VHJR18XwicTB6hR8STs7I+Y6yNwFjF7LBpdYxsF lsVEFU0dTpbsLStAjgGyTrqwdyNC4z29feEqFrAgf9y6ZWOz/Rn4DogpUBPwy/2vWHE9 fdreM7xTvFXAEayq6P5gt2Ohl+lD6Ld7Whz9w= MIME-Version: 1.0 Received: by 10.100.107.20 with SMTP id f20mr6038352anc.14.1249184796971; Sat, 01 Aug 2009 20:46:36 -0700 (PDT) In-Reply-To: <4A750B42.3000003@borwankar.com> References: <921000908011857s26dbfcc8y7dc79b353f2efd98@mail.gmail.com> <389E5804-404F-4DC4-A051-F2A75992BC60@gmail.com> <4A74FD6C.7030907@borwankar.com> <4A750B42.3000003@borwankar.com> Date: Sat, 1 Aug 2009 23:46:36 -0400 Message-ID: Subject: Re: callback=? parameter expected by jQuery $.ajax() causes couch to complain about bad URL From: Paul Davis To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Sat, Aug 1, 2009 at 11:42 PM, Nitin Borwankar wrote= : > Paul Davis wrote: >> >> Nitin, >> >> Its not 0.9.1 either, the minor versions are bug fixes only. You'll >> have to either wait for 0.10.0 or ride trunk to get JSONP. >> >> There's nothing with content-type to worry about. The only thing I'm >> not sure of is if we fixed the _ parameter rejection or not. If not >> you can just add ignore=3Dtrue to JSONP requests. >> >> > > So for now if =A0I want to make couch REST calls via javascript in the br= owser > =A0- I use couch.js ? =A0jquery.couch.js ? > > Nitin > > JSONP is only required for cross domain requests. If you're using CouchApps then you can just call to the hosting URL of interest using normal jquery calls. If you do need the cross domain requests then there really isn't anything that can be done for 0.9 other than writing a proxy or overcoming the limitations with a proxy or some other approach. HTH, Paul Davis > > >> Paul >> >> On Sat, Aug 1, 2009 at 10:43 PM, Nitin Borwankar >> wrote: >> >>> >>> Paul Joseph Davis wrote: >>> >>>> >>>> Ntitn, >>>> >>>> Are you on couchdb trunk? Pretty sure jsonp was after 0.9. >>>> >>> >>> Hey Paul, >>> >>> Thanks much >>> >>> I am on couchdbx 0.9 on leopard 10.5.7 >>> >>> Is jsonp in 0.9.1 ? =A0That would be motivation for me to move. >>> >>> Also assuming the answer is yes - in the new improved couch - do I just >>> use >>> the callback=3D? on the client request or do I have to do something in = my >>> views to set content-type? as well. >>> >>> Thanks much, >>> >>> Nitin >>> >>>> >>>> Paul Davis >>>> >>>> >>>> >>>> On Aug 1, 2009, at 9:57 PM, Nitin Borwankar wrot= e: >>>> >>>> >>>>> >>>>> Hello all, >>>>> >>>>> I =A0have been banging my head against this wall for 2 days and I fin= ally >>>>> made >>>>> a crack --- >>>>> >>>>> Trying to use jQuery, $.ajax() =A0in an app that calls couchdb api - = not >>>>> using >>>>> ( cannot use ) couchapp must call from legacy app. >>>>> Couldn't get a successful response. >>>>> >>>>> finally just put the get query into firefx and go the following which >>>>> explains why it's not working - but not a clue how to work around thi= s. >>>>> >>>>> get query: >>>>> >>>>> >>>>> http://localhost:5984/ptest2/_design/vt2/_view/tag?group=3Dtrue&limit= =3D5&callback=3D >>>>> ? >>>>> couch responds: {"error":"query_parse_error","reason":"Bad URL query >>>>> key:callback"} >>>>> >>>>> I don't have the option to use either couch.js or jquery.couch.js but >>>>> have >>>>> to use vanilla jQuery ajax calls $.get, $.ajax, $.post, $,getJSON etc= . >>>>> >>>>> Am I stuck without any help possible ? >>>>> >>>>> Nitin >>>>> >>>>> >>>>> 37% of all statistics are made up on the spot >>>>> >>>>> >>>>> ---------------------------------------------------------------------= ---------------- >>>>> Nitin Borwankar >>>>> nborwankar@gmail.com >>>>> >>> >>> > >