Leaving a secure site

In certain scenarios (ex: secure sites) we want to notify the user that the link or action they have just performed will exit the current secured site/session and it is possible that data could be lost. The message allows the user to cancel the redirect or continue with the redirect.

When enabled, this feature will:

Implementation

The exitscript is added in the refFooter section of the page, via the exitSecureSite object. This object has the following properties that can be assigned a value:

document.write(wet.builder.refFooter({
...
    "exitSecureSite" : {
        exitScript: true,
        displayModal: true,
        exitURL: "exiturl-en.html",
        exitMsg: "This is a custom message. You are about to leave a secure site, do you wish to continue?",
        cancelMsg: "Nope",
        yesMsg : "Sure",
        targetWarning: "Warning: This will open in another window!",
        exitDomains : "developer.mozilla.org, www.esdc.gc.ca, www.jobbank.gc.ca"
    }
...
}));
            

Example