buguito Posted March 17, 2017 Share Posted March 17, 2017 Guys, is there a way to capture the remaining time for a session to expire? My project expires with 10 minutes, but I would like to display this time. Thank you Julio Cesar Link to comment Share on other sites More sharing options...
Sherzod Posted March 17, 2017 Share Posted March 17, 2017 Hi, Which edition and build are you using?! Best regards. Link to comment Share on other sites More sharing options...
buguito Posted March 17, 2017 Author Share Posted March 17, 2017 version 0.99.96.1321 Link to comment Share on other sites More sharing options...
Sherzod Posted March 17, 2017 Share Posted March 17, 2017 Commercial edition ?! Link to comment Share on other sites More sharing options...
buguito Posted March 17, 2017 Author Share Posted March 17, 2017 Trial Link to comment Share on other sites More sharing options...
Sherzod Posted March 17, 2017 Share Posted March 17, 2017 Hi, Trial But Trial expires after 3 mins, Where did you download? Link to comment Share on other sites More sharing options...
buguito Posted March 17, 2017 Author Share Posted March 17, 2017 I'm testing the tool to make the purchase. In production it should be 10 minutes In my tests I'm using 1 minute to expire Link to comment Share on other sites More sharing options...
buguito Posted April 4, 2017 Author Share Posted April 4, 2017 I was able to accomplish the mission using some variables MainForm - Script: Function CheckIdleTime () { _idleSecondsCounter ++; Var oPanel = document.getElementById ("SecondsUntilExpire"); If (oPanel) OPanel.innerHTML = (IDLE_TIMEOUT - _idleSecondsCounter) + ""; AjaxRequest (MainForm.form, _idleSecondsCounter); If (_idleSecondsCounter> = IDLE_TIMEOUT) { AjaxRequest (MainForm.form, '_idle_timeout', []); } } function RetornaTempoRestante(pSegRestante: String): String; const cSegParaExpirar: Integer = 30; // var iSegOciosos , iSegRestante: Integer; begin try iSegOciosos := StrToInt(pSegRestante); iSegRestante := (cSegParaExpirar - iSegOciosos); Result := SegundosToTime(iSegRestante); except Result := ''; end; end; procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if IsNumeric(EventName) then UniLabel1.Caption := 'Tempo restante para expirar: ' + RetornaTempoRestante(EventName); if EventName = '_idle_timeout' then ShowMessage('Expirou'); end; Link to comment Share on other sites More sharing options...
Alessandro Posted March 2, 2018 Share Posted March 2, 2018 Olá BUGUITO Eu não consegui reproduzir este exemplo. Você poderia me mandar um exemplo com fontes pra eu dar uma olhada? A mensagem de expirado é exibida ao final, porém, o label não mostra a contagem. Obrigado Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now