I am trying to replace Alert with Bootstrap alert but not able find perfect solution.
I want to pop alert box with Yes or No. If user select Yes than process resumes with operations. If user select No the current pop will hide.
Any help will be appreciated.
var me = $(this);
if (me.data('requestRunning')) {
return;
}
me.data('requestRunning', true);
if (confirm("Do you want to delete ?")) {
var row = $(this).closest("tr");
var ProductID = {
ProductID: row.find(".ProductID").find("span").html()
}
$.ajax({
type: "POST",
url: '@Url.Action("DeleteData", "Product")',
data: JSON.stringify(ProductID),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
row.remove();
}
});
}
me.data('requestRunning', false);