Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 93489 invoked from network); 19 Jan 2011 16:59:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jan 2011 16:59:56 -0000 Received: (qmail 8604 invoked by uid 500); 19 Jan 2011 16:59:55 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 8238 invoked by uid 500); 19 Jan 2011 16:59:52 -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 8222 invoked by uid 99); 19 Jan 2011 16:59:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jan 2011 16:59:51 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.44.54] (HELO smtp109.prem.mail.sp1.yahoo.com) (98.136.44.54) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 19 Jan 2011 16:59:51 +0000 Received: (qmail 20783 invoked from network); 19 Jan 2011 16:59:30 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type; b=HMi8XMN9FNTHS3lMDZjutQCHcLWrXODl87uWg512efWeDUoEBHv40hV4vHBlhxjVfSHcrYT/thefYCYvmNpiolCaNnP2HW5nWy5ml0IDabZMFia8rSTlIY+3TuYCQ9AH/h9GiLyYZ4TdF3jr47GowFFpC/s4LqosGc7V+WPdXms= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1295456370; bh=Z6moxsipMYBmCGwbqQRS/EkqWx9UdGBmuBsrL2iPiSI=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type; b=rZ8TLQ/Gp7UHpekhBQIaDDGS30bH9KPRJrJBOoN4gTJHbCjmKHNknrNZfU0AvdX2yq5hmr+iJ4KPIY+X51n/H/nw6ssDB+Sj0Z3RwOrxcEPj41j+Mvhw5CVi9WjhhBAUgPCjqRzJWseHk12XsCG8GD+cR1vSxDbuZfH5yjX2Wtg= Received: from MacDaddy.local (csj790@98.207.50.174 with plain) by smtp109.prem.mail.sp1.yahoo.com with SMTP; 19 Jan 2011 08:59:30 -0800 PST X-Yahoo-SMTP: cbef2U2swBCtkSD6VBey7XQqDQ-- X-YMail-OSG: 2u34Dq4VM1msA0Se0Gv38kvAA.rGj7ik6zvESbspQFVi5O6 KbsyltzdTRvHjN9g4gU5GZf36i7WKbM7upYQ87poqDgQRKnpYDBtggYmgoYb 7EgQIvu59CVNcTx9Roe2VueMCAIIpCZRbbCzmQPPP4I1S6EAuncPNpJ35TDZ BMs9ccoRQ1ovdwiTXF7cDdz.xo3lgm2xm21opInFpXpA0CRmPwrjk1sGzKMg oLZCFrP8nDXI5taLX9_L9vS4B8axMac47UFX.ZABZBix2eNSm_J2Qw.1ZaIU UK6OmEZ6gisVpBBXdxOG2cIUQ4rAdkGl2ESmY_g-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4D371870.9070207@yahoo.com> Date: Wed, 19 Jan 2011 08:59:28 -0800 From: Chris Johnson User-Agent: Postbox 2.1.0 (Macintosh/20101209) MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: simple AJAX request References: <4D364D6E.9000808@yahoo.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------000800090900010009080401" --------------000800090900010009080401 Content-Type: multipart/alternative; boundary="------------000404030705070708030802" --------------000404030705070708030802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sorry for that... I did some more digging. The original error I was getting was the result of an typo within the couchapp code, so I was able to resolve that. Unfortunately, that did not resolve my ajax issue. I have attached a snapshot of the output from firebug showing the responses I was getting. Something else I tried was to use the jquery lib, but had similar issues with it. Here is the code snippet for each of them: Just to summarize these in reference to the snapshot, the first 'GET' response is responding to the db.info. As you can see the correct response is there, but when I try to log it, I get 'undefined'. Similar to that, the second 'GET' is in response to the .getJSON, where I get the correct response, but when I try to log it, I am not getting what I would expect to see. Not sure where the third 'GET' is coming from, but the fourth one is coming from Evently. Hope this helps Thanks in advance for you help > ------------------------------------------------------------------------ > > Stefan Matheis > January 19, 2011 12:23 AM > > > Hey Chris, > > "... but get an error. ..." is a bit of no-information :/ which error did > you get? with firefox/firebug or chrome, check your console to access the > details. > accessing your couchdb with the same url works? > > Stefan > > > ------------------------------------------------------------------------ > > Chris Johnson > January 18, 2011 6:33 PM > > > I am new to couchdb and have been successfully using it with the > python libs. I am trying to move to JS, which I am new to as well, and > having some challenges. I know this is a simple question, so please > bare with me. I am trying to make a simple ajax call to pull data from > a view but get an error. I have tried with both the full URL and just > he view information with no luck. What am I missing? > > > --------------000404030705070708030802 Content-Type: multipart/related; boundary="------------090802090507010805010204" --------------090802090507010805010204 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sorry for that...
I did some more digging. The original error I was getting was the result of an typo within the couchapp code, so I was able to resolve that. Unfortunately, that did not resolve my ajax issue. I have attached a snapshot of the output from firebug showing the responses I was getting. Something else I tried was to use the jquery lib, but had similar issues with it.

Here is the code snippet for each of them:
     <script type="text/javascript" charset="utf-8">
        db = $.couch.db("sessions");
        $.log('info :' + db.info());
     </script>

    <script type="text/javascript" charset="utf-8">   
        $.getJSON('_list/sort/srcAddr?group=true', function(data) {
            $.log('list: ' + data)});
    </script>

Just to summarize these in reference to the snapshot, the first 'GET' response is responding to the db.info. As you can see the correct response is there, but when I try to log it, I get 'undefined'. Similar to that, the second 'GET' is in response to the .getJSON, where I get the correct response, but when I try to log it, I am not getting what I would expect to see. Not sure where the third 'GET' is coming from, but the fourth one is coming from Evently.

Hope this helps

Thanks in advance for you help


Stefan Matheis
January 19, 2011 12:23 AM

Hey Chris,

"... but get an error. ..." is a bit of no-information :/ which error did
you get? with firefox/firebug or chrome, check your console to access the
details.
accessing your couchdb with the same url works?

Stefan




Chris Johnson
January 18, 2011 6:33 PM

I am new to couchdb and have been successfully using it with the python libs. I am trying to move to JS, which I am new to as well, and having some challenges. I know this is a simple question, so please bare with me. I am trying to make a simple ajax call to pull data from a view but get an error. I have tried with both the full URL and just he view information with no luck. What am I missing?

<script type="text/javascript" charset="utf-8">
         $.getJSON("_view/status", function(data) {
            alert("JSON Data: " + data);
          });
</script>

--------------090802090507010805010204 Content-Type: image/jpeg; x-apple-mail-type=stationery; name="compose-unknown-contact.jpg" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="compose-unknown-contact.jpg" /9j/4AAQSkZJRgABAQEARwBHAAD/4QCARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEa AAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAAby AAAAGQAABvIAAAAZAAKgAgAEAAAAAQAAAB2gAwAEAAAAAQAAAB0AAAAA/9sAQwABAQEBAQEB AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB AQEB/9sAQwEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB AQEBAQEBAQEBAQEBAQEBAQEB/8AAEQgAHQAdAwERAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAA AAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQci cRQygZGhCCNCscEVUtHwJDN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LP9nlWSGeMzHdIsFyhZUVnBfEkEwDM+MAgAA4f9pzV4td0r4Z6rDDJbpd r4wPkzFTJG8M/h+3kUlThh5kTlG4LIVYqpJUAHPWHx70OHRvD2l6n8Of7Un0DQNJ0BL7/hL7 uy+0RaVapbrN9mt9HKRec4km8syTNH5nlmaQIGoAn/4X34T/AOiU/wDl86l/8p6AD/hffhP/ AKJT/wCXzqX/AMp6APPfib8TbT4gWnhmxsfDP/CN2vhv+2fKi/tmXWPtH9sS2Ez/ADzWFnJF 5Ulk7fM8/mefgeUsQDgH/9k= --------------090802090507010805010204 Content-Type: image/jpeg; x-apple-mail-type=stationery; name="postbox-contact.jpg" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="postbox-contact.jpg" /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoM DAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsN FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAAR CAAdAB0DAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk NOEl8R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ZixwGBA5J6V UYqOiJv0NXxd4u/4Sr7J/on2XyN//LTfu3bfYY+7VCP/2Q== --------------090802090507010805010204-- --------------000404030705070708030802-- --------------000800090900010009080401--