I have a custom upvote downvote buttons appended to the popups via webviewer which you helped me with a month or so ago. I have the code working more or less and I want to know how I can have the button count be saved when I click the annotation "saved" button. Please see the code below and tell me what I need to do to keep the counts saved. If this isn't possible let me know why it isn't and an alternative.
var popupId = 0;
var popupId2 = 0;
var am = readerControl.docViewer.GetAnnotationManager();
am.on('annotationPopupCreated', function(e, annotation, $popupel) {
popupId++;
popupId2++;
$popupel.css('background', '#6d97a5');
$popupel.find('textarea').css('font-family', 'Arial').css('font-size', '80%');
$popupel.find('.popup-subject').text("");
$('<div id="' + popupId + '" style="margin-left: 30px; float: left; font-weight: bold; color: white; font-family: Arial; margin-top: -4px;"></div>').appendTo($popupel);
$('<div id="' + popupId2 + '" style="margin-right: 30px; float: right; font-weight: bold; color: white; font-family: Arial; margin-top: -4px;"></div>').appendTo($popupel);
$('<div style="float: left; margin-left: 5px; margin-top: 5px;"><img style="cursor: pointer; margin-top: -13px;" src="/lib/up.png"></div>').appendTo($popupel).click(function() {
var upcount = 0;
upcount++;
$("#" + popupId).html(upcount);
});
$('<div style="float: right; margin-right: 5px; margin-top: 5px;"><img style="cursor: pointer; margin-top: -13px;" src="/lib/down.png"></div>').appendTo($popupel).click(function() {
var downcount = 0;
downcount++;
$("#" + popupId2).html(downcount);
});
});