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