I need to adjust this popup alert so that if the user clicks "cancel" it will cause them to stay on the same page (instead of being redirected to the page from the link they clicked on). Here's what I'm working with:
function myFunction() {
var txt;
if (confirm("Are you sure you want to move on? Your work on this passage
will be lost.")) {
} else {
}
Could you give me some tips? Thanks!