Confirm and Shutdown on Close
Profound UI provides several flags for determining what to do when the user closes the browser window in the middle of a session:
pui.confirmOnClose - when set to true, a confirmation window comes up warning the user before closing the browser window; the user can cancel the action or proceed to close the window; the default value is true
pui.closeMessage - the warning text to display in the confirmation window. Note: Starting with Profound UI Version 4, Fix Pack 6.2, the pui.closeMessage option still works, but is deprecated. We recommend that you use Language Support instead.
pui.skipConfirm - flag that can be set temporarily to skip the confirmation window when the pui.confirmOnClose flag is set to true
pui.shutdownOnClose - when set to true, the browser sends a request to the server to shut down the session and end any server jobs associated with the session; the default value is true
pui.hardshutdownOnClose – when set to true, the browser sends a request to the server to end the Genie application job, instead of just disconnect it; the default value is false. This configuration option is applicable to Genie only, and is available in Profound UI releases later than 6.19.2.
The pui.confirmOnClose and pui.shutdownOnClose flags are reset to their default values every time a new screen is rendered.
Note that the pui.closeMessage feature will only work properly in Internet Explorer. The window text in other browsers, such as Chrome and Firefox, is not able to be customized due to changes made to the browser.
Examples:
The following code demonstrates how the Confirm and Shutdown on Close flags are used:
// The following are default settings
pui.confirmOnClose = true;
pui.closeMessage = "This will end your session.";
pui.shutdownOnClose = true;
The following code demonstrates the use of the pui.skipConfirm flag:
// link to a file download
pui.skipConfirm = true;
location.href = "/download.pgm";
// reset the skip flag after 1 second
setTimeout(function() {
pui.skipConfirm = false;
}, 1000);
Where do you save this configuration option? Here.