Follow

Exit Safeguard

The Exit Safeguard control is used as a confirmation message that is activated when the user closes a browser window or tab. This control can be used to prompt the user that they are about the close a window or tab.  

Note: To combat unwanted pop-ups, some browsers may not display prompts created in beforeunload event handlers unless the page has been interacted with; this is currently true for FireFox.  If a user never interacts with a page, the browser does not display the confirmation message.  Chrome versions 51 and above no longer support displaying a custom message for the Exit Challenge.

 

 Configuration

Challenge On Exit By Default When selected (true) a challenge is presented to the user if they attempt to close the browser window. Also activates when navigating away from page. To avoid this challenge, use the setExitChallenged(false) in the navigation event (such as On Click, for buttons) to suppress the challenge. There is ultimately no way to prevent a user from closing their browser in some unsafe way (this is a security feature in many browsers). This is only an added measure so that developers can warn users that closing a window will not close or finish the task, and can potentially result in unexpected behavior.

Exit Challenge Message Custom message to display on unload

Example

These are the configuration option settings...

This is the result...

 Methods

For detailed information on the available methods for this control, access the JS Doc file.

 

  • Author: Erick Quintanilla
  • Date Created: June 8, 2015
  • Date Modified: August 4, 2015
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments