function ToggleVProcure(chkValidProc) { $.ajax({ type: "POST", url: "DocumentManager.aspx", data: { Action: "ValidateProcure", Id: chkValidProc.attributes["DId"].value }, dataType: "json", success: function (data, textStatus) { if (textStatus == "success") { var chkProc = $('[did="' + chkValidProc.attributes["Did"].value + '"]'); var checkCPD = $('[docid="' + chkValidProc.attributes["Did"].value + '"]'); var span = $('#span' + chkValidProc.attributes["Did"].value); var supplierId = $("#chkValidProc").attr("SId"); if (checkCPD.attr('checked') && chkProc.attr('checked')) { span.attr("style", "color: Green;"); var s = $('input[SId="' + supplierId + '"]:checked').length; var totalperc = (s / 13 * 100).toFixed(1); $(chkValidProc.parentNode.parentNode.parentNode.parentNode).find('#lblTotalScore').text(Math.floor(totalperc.toString())); } else { span.attr("style", "color: Red;"); var s = $('input[SId="' + supplierId + '"]:checked').length; var totalperc = (s / 13 * 100).toFixed(1); $(chkValidProc.parentNode.parentNode.parentNode.parentNode).find('#lblTotalScore').text(Math.floor(totalperc.toString())); } MyAlert("Success", "This Document's Procurement Validation Status Has been Updated.", "NOTE"); } }, error: function (data, textStatus, errorThrown) { alert("An unexpected error occurred: " + errorThrown); } }); }
debugger
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)