function adobeSuccessClick(contextId, id) { //alert('adobeSuccessClick'); var valid = confirm("Confirm success?"); if (valid==true) { ajaxAdobeUpdate(contextId, id, 'success'); } return false; } function adobeFailClick(contextId, id) { var valid = confirm("Confirm Fail?"); if (valid=true) { var reason = jQuery("#adobeFailReason").val(); jQuery("#adobeFailReason").val(""); ajaxAdobeUpdate(contextId, id, 'fail', reason); } return false; } function setSuccessValue(val) { jQuery("#successCount").html("Success Value: "+val); } function setFailValue(val) { jQuery("#failCount").html("Fail Value: "+val); } function setCreateRevisionNote(val) { jQuery("#createRevisionNote").html(val); } function ajaxAdobeUpdate(contextId, id, action, reason) { var request = '' + '&bugId='+id + '&page=alcea.custom.adobe.SuccessFail' + '&makeUniqueUrl=' + (new Date().valueOf()) + '&action='+action + '&failReason=' + encodeURIComponent(reason); jQuery.get(request,function (data) { if (data.length > 10) { eval(data); } else { alert('ajaxAdobeUpdatefailed'); } }) .fail(function() { alert("Problem connecting to server!"); }); } function ajaxAdobeCreateRevision(contextId, id) { var request = '' + '&bugId='+id + '&ajax=1' + '&page=alcea.custom.adobe.CreateRevision' + '&makeUniqueUrl=' + (new Date().valueOf()) + '&bugId=' + id; jQuery.get(request,function (data) { if (data.length > 10) { eval(data); } else { alert('ajaxAdobeCreateRevision'); } }) .fail(function() { alert("Problem connecting to server!"); }); }