Is it possible to have a session timeout warning for an A5W page?
I found the below code from a tabbed ui and was wondering if it could be adapted to work in an A5W page. I'm a xbasic novice so I thought I'd ask here. Thanks.
I found the below code from a tabbed ui and was wondering if it could be adapted to work in an A5W page. I'm a xbasic novice so I thought I'd ask here. Thanks.
Code:
tbiObj._timeToSessionTimeout = function(units) { if(isNaN($a.lastCallback)) return 9999999999999999; var t = (Date.now() - $a.lastCallback); var tte = (tbiObj._sessionTimeoutInMSeconds - t); if(units == 's') return (tte/1000); if(units == 'm') return (tte/60000); if(units == 'ms') return (tte); return tte } DIM tmpl.warnBeforeSessionExpires as L = .T. DIM tmpl.checkSessionEvery as N = 1 DIM tmpl.warningIntervalBeforeExpiration as N = 1 DIM tmpl.sessionTimeOutWarningMessage as C = "Your session will expire in {secondsToSessionEnd} seconds. Click the button to extend your session." DIM tmpl.sessionExtendSessionButtonLabel as C = "Extend Session" DIM tmpl.sessionTimeoutWarningDialogTitle as C = "Warning" DIM tmpl.sessionHasExpiredMessage as C = "Your session has expired." DIM tmpl.sessionHasExpiredButtonLabel as C = "OK" DIM tmpl.sessionHasExpiredAction as C = "Redirect To Another Page" DIM tmpl.sessionHasExpiredRedirectPage as C = "login.A5W" DIM tmpl.sessionHasExpiredDialogTitle as C = "Notice" DIM tmpl.sessionHasExpiredOKButtonJavascript as C