jquery-confirm
jquery-confirm copied to clipboard
Close confirm box at the end of the button action
jquery-confirm version: v3.3.4
I'm submitting a ... (check one with "x") [ ] bug report [ ] feature request [x ] support request
Current behavior: In a confirm box I am opening a window in a new tab. When i return to the calling tab, the confirm box is still open. I would like the confirm dialog to close after the window opens.
the confirm box is still open after the new tab opens Expected behavior:
the confirm box should close after the new tab opens
Related code:
function PaymentLinkClicked(e){
var onLinePaymentLink = $("#OnlinePaymentLink").val();
var dpPaymentDate = $("#CheckDate").data("kendoDatePicker");
var previousPaymentDate = dpPaymentDate.value();
var currentDate = new Date();
if(previousPaymentDate == null){
dpPaymentDate.value(currentDate);
$("#OnlinePayment").val(true);
window.open(onLinePaymentLink, '_blank');
}
else{
var paymentConfirmationMessage = "It appears you may have already paid. Do you want to continue and overwrite the previous payment date?";
$.confirm({
title: "Already Paid?",
titleClass: 'titleBlue',
content: paymentConfirmationMessage,
columnClass: "col-md-auto",
buttons: {
confirm: {
text: "Yes",
btnClass: 'btn-green',
action: function () {
dpPaymentDate.value(currentDate);
$("#OnlinePayment").val(true);
window.open(onLinePaymentLink, '_blank');
}
},
cancel: {
text: "No",
action: function () {
}
}
}
});
}
}
**Other information:**