How to improve a popup window displayed via the alert function?

14 0 2

Hi everyone,

I have the following code in a .js file which displays a popup window when the If condition is false:

if ($("#agree").is(":checked")) {
} else {
alert("You must agree with the terms and conditions of sales to check out.");
return false;

I have the following questions:

1) At the moment the popup shows near the top, as far as I know it's not possible to center it when using alert, what would be the easiest alternative?

2) How can I retrieve the page language and use it in an IF condition to display the message either in English or French?

Thank you very much in advance!

Replies 0 (0)