function UpdateAccess() {
var permissionModel = new Object();
permissionModel.RoleId = $("#accessid").val();
permissionModel.Role = $("#role").val();
permissionModel.Tag = $("#tag").val();
permissionModel.Status = $("#status").val();
return $.ajax({
contentType: 'application/json; charset=utf-8',
dataType: 'json',
type: 'POST',
url: "/Home/SaveAccess",
data: JSON.stringify({
permissionModel: permissionModel
}),
success: function (result) {
if (result.result) {
Reset();
dataTable.ajax.reload();
$("#AccessModal").modal('hide');
} else {
swal("Access Fail!")
}
},
error: function () {
swal("Error")
}
});
}
Loading
Emmmanuel FIADUFEPosted Nov 28, 2023, 5:44 PM
Well noted Ray
Subarta RayPosted Nov 28, 2023, 5:24 PM
Hi Emmanuel ,
Please verify the below things .
Verify that the server-side code (
SaveAccessmethod) is correctly implemented and can handle the update operation.Inspect the network request using browser developer tools to check the request payload, headers, and server response.
Ensure the server-side code is properly configured to handle the data sent in the request.