I'm new to JavaScript and we have been coding using Monaca and our lesson this week is editing/deleting data. While going through my JavaScript and running it I notice an error on line 280 for me on the debugger but when I look at the code I personally cannot find the syntax error within it. If you guys can help me find it and explain what I missed and what I could do better would be great.
myDB.get(comicWIP, function(failure, success){
if(failure) {
console.log("Error: " + failure.message);
} else {
console.log("About to update: " + success._rev);
// Re-save to database with a new revision (_rev)
myDB.put({
"_id": success._id,
"_rev": success._rev,
"title": $valInTitleEdit,
"author":$valInAuthorEdit,
"year": $valInYearEdit,
"publisher": $valInPublisherEdit,
"notes": $valInNotesEdit
}, function(failure, success){
if(failure) {
console.log("Error: " + failure.message);
} else {
// Note: it's .rev NOT ._rev at this point to show Revision #
console.log("Updated comic: " + success.rev);
// Redraw the table with changes
fnViewComics();
$("#pgComicViewEdit").dialog("close");
} // END If..else .put()
}); // END .put()
} // END If..Else .get()
}); // END .get()
} // END fnEditComicConfirm(event)
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment