I have a requirement to display a popup message (similiarly to the outcome of the "confirm" function of Alertify.js), and to unconditionally refresh the screen after the popup is being closed by the user, whether it is done through the 'X' or the 'OK' button.
Basically, the "confirm" function proposed by Alertify.js adheres to my need except its "Cancel" button (as it does nothing after the user clicks on it). If I could get rid of the cancel button somehow that would be great, but I'm not sure how to or if I'm even able to at all. What work-around would you suggest to that matter?
I tried this code,
alert("Successful Message");
location.reload();
This code causes the screen to refresh but doesn't show the alert. I guess the second line doesn't wait for the alert message to be closed and just immediately reloads the screen.
Thanks in advance!