incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomy <toma...@yahoo.com>
Subject Re: couchdb local.ini set up
Date Fri, 11 Jun 2010 08:48:31 GMT
Thanks a lot guys for ur help I really appreciate it:
Could u please explain how can I modify
this 'app.db.saveDoc({channel:cname,message:message});' for my application,
how the saveDoc() function works

function joinChannel(app, cname) {
  var authorRand = Math.random().toString();
  $("#frPage").submit(function() {
    var apl, apid, first, last, dsc, email, _id;
    apl = $("#app").val();
    apid = $("#appid").val();
    first = $("#first").val();
    last = $("#last").val();
    dsc = $("#desc").val();
    email = $("#email").val();
    if (apl) {
      var message = {
        _id:idGenerator(),
        apinfo: { apl : apl,  apid:apid, dsc:dsc
        },
        owner:{ first:first, last:last, email:email
        },
        date : new Date()
      };
      alert(JSON.stringify(message));
      app.db.saveDoc({channel:cname,message:message});
    }
    return false;
  }) 

thanks



Mime
View raw message