Jump to content

Timeout Warning


dkeene

Recommended Posts

Hello

Is there any way to make the application WARN the user when a timeout will occur? For example, using online banking, no matter what form I am on, if I leave the session unattended it will pop-up a warning and indicate X minutes to forced log off unless you wish to continue, and if not, will close the session and revert to login screen? This would protect your banking information and privacy and prevent user from leaving the system unattended.

Thank you! Any example would be helpful

Doug

 

Link to comment
Share on other sites

8 hours ago, dkeene said:

Is there any way to make the application WARN the user when a timeout will occur? For example, using online banking, no matter what form I am on, if I leave the session unattended it will pop-up a warning and indicate X minutes to forced log off unless you wish to continue, and if not, will close the session and revert to login screen? This would protect your banking information and privacy and prevent user from leaving the system unattended.

Hello,

You can also analyze this post...

 

Link to comment
Share on other sites

Thank you, Sherzod for the reference. 

Are you saying to copy the following text into the form's "SCRIPT" property in the object inspector:

var IDLE_TIMEOUT = 60; //seconds
var _idleSecondsCounter = 0;
document.onclick = function() {
    _idleSecondsCounter = 0;
};
document.onmousemove = function() {
    _idleSecondsCounter = 0;
};
document.onkeypress = function() {
    _idleSecondsCounter = 0;
};
window.setInterval(CheckIdleTime, 1000);

function CheckIdleTime() {
    _idleSecondsCounter++;
    var oPanel = document.getElementById("SecondsUntilExpire");
    if (oPanel)
        oPanel.innerHTML = (IDLE_TIMEOUT - _idleSecondsCounter) + "";
    if (_idleSecondsCounter >= IDLE_TIMEOUT) {
        //alert("Time expired!");
        //document.location.href = "logout.html";
        ajaxRequest(MainForm.form, '_idle_timeout', []);
    }
}

 

and then copy the following into the form's OnAjaxEvent:

 

  if EventName = '_idle_timeout' then
  begin
    // your logic
    ShowMessage('idle_timeout');
  end;

 

this is what I tried but no result.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...