Hello everyone,
I was wondering if maybe anyone has come across with the following situation. I added a button on the grid. I want the user to confirm they want to proceed before processing the event on the server side. I can do this with the confirm option in javascript, if(!confirm('Are you sure...?)) return false; but what if I have custom dialog, modal popups instead of the regular alert popups. This won't be possible. Now I am wondering if there is any way to stop/pause the button until the user confirms in the modal popup if they want to proceed or not. Here is the modal popup I am using.
Thanks,
Here is what I have. this is onClient before
swal({
title: "Are you sure?",
text: "This will be submitted for Payroll. No revision past this point.",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, Process Hours!",
cancelButtonText: "No, Cancel!",
closeOnConfirm: true,
closeOnCancel: false },
function(isConfirm){
if(!isConfirm) {
swal("Cancelled", "Payroll was not processed.", "error");
return false;
}
});