Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close confirm box at the end of the button action #574

Open
dchillman123 opened this issue May 31, 2023 · 0 comments
Open

Close confirm box at the end of the button action #574

dchillman123 opened this issue May 31, 2023 · 0 comments

Comments

@dchillman123
Copy link

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:**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant