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 or continue to the external site.

When enabled, this feature will:

Implementation

The exit script 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:

The attribute cdts-exitscript-disabled can be added to individual links to exempt them from exit script.

document.write(wet.builder.refFooter({
...
    "exitSecureSite" : {
        exitScript: true,
        displayModal: true,
        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

The following examples are links that show the modal dialog.

For examples with redirect, please visit here.