#grdTimeReport grid should get disabled when clicking on approve button.
It was working fine in IE but not in chrome.
What I have tried:
function OnchangeStatus()
{
debugger;
var YearFromPage = $("#selYear").val();
var MonthFromPage = $("#selMonth").val();
var EmployeeID = $("#hdnusrTableId").val();
var status = $("#selStatus").val();
var id = statusID;
if (status == "2") {
$('#grdTimeReport').prop('disabled', true);
timesheetStatus = "Approved";
$("#statusLabel").css("color", "Green");
$("#statusLabel").text(timesheetStatus);
$.ajax({
contentType: 'application/json',
type: 'POST',
dataType: "json",
data: JSON.stringify({ "Id": id, "EmpId": EmployeeID, "year": YearFromPage, "month": MonthFromPage, "status": timesheetStatus }),
url: timesheetStatusUpdateUrl,
success: function (data) {
//debugger;
hideModificationOption();
window.alert("Status updated successfully");
},
error: function (error, errostatus, er) { debugger; }
});
}
else {
$('#grdTimeReport').prop('disabled', false);
timesheetStatus = "Denied";
$("#statusLabel").css("color", "Red");
$("#statusLabel").text(timesheetStatus);
$.ajax({
contentType: 'application/json',
type: 'POST',
dataType: "json",
data: JSON.stringify({ "Id": id, "EmpId": EmployeeID, "year": YearFromPage, "month": MonthFromPage, "status": timesheetStatus }),
url: timesheetStatusUpdateUrl,
success: function (data) {
window.alert("Status updated successfully");
},
error: function (error, errostatus, er) { debugger;}
});
}
}