incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Woodward <m...@mattwoodward.com>
Subject Re: Line Breaks in JSON Causing Issue With jQuery
Date Wed, 10 Nov 2010 20:44:53 GMT
For anyone else coming across this thread, I enabled JSONP in my ini file
and restarted CouchDB, did a bunch of experimentation, and finally hit on
what works (for me anyway):

var dbURL = "
http://server:5984/database/_design/designname/_view/viewname?callback=?";
$.getJSON(dbURL, null, function(data) { alert(data.rows[0].value.whatever);
});

If the alert looks right (and use Firebug to check your full response of
course), then you should be in good shape.

Firebug still complains in some cases (I tried a ton of iterations of things
so I'd have to retrace my steps to see where exactly this occurs) because of
the line breaks, but that seems to be a red herring.

This is CouchDB 1.0.1 on Windows Server if that makes a difference to
anyone.

Thanks for the help!

--
Matthew Woodward
matt@mattwoodward.com
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

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