couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alux <alu...@googlemail.com>
Subject redirect from update, howto? (find the mistake)
Date Mon, 02 Aug 2010 10:32:26 GMT
Hello,

I use the new in-place update functionality, and I want to de-uglify its
appearance in the browser by redirecting it back to the page that stared the
action.

So I took some suggestions from
wiki.apache.org/couchdb/Formatting_with_Show_and_List and tried the
following, but to no avail

function(doc, req) {
   var field = req.query.field;
   var value = req.body.substring(6);
   doc[field] = value;
   return [doc, {'code': 302, 'body': 'See other', 'headers': {'Location':
'/'}}];
}

The browser (opera, firefox) show me the "See other", instead of going to /

Probably it's me who makes the mistake, can you please point me to it?

Thank you, alxu

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