You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Alux <al...@googlemail.com> on 2010/08/02 12:32:26 UTC
redirect from update, howto? (find the mistake)
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