Jump to content

PatrykWro

uniGUI Subscriber
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

PatrykWro's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. I checked demo with Login Page and it works correctly. After that I've started check my code again and I found the problem. For my MainForm in the Script property I have a code like below: var IDLE_TIMEOUT = 3600; //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) { ajaxRequest(MainForm.form, '_idle_timeout', []); } else { ajaxRequest(MainForm.form, '_curr_timeout', ['IDLE_TIMEOUT='+IDLE_TIMEOUT,'_idleSecondsCounter='+_idleSecondsCounter]); } } onbeforeunload = function() { return "To spowoduje zamknięcie aplikacji bez zapisu ewnetualnych zmian! Czy jesteś pewien?"; }; This is part of code to automatic logout if user doesn't use mouse. It works correctly but the problem i in the last line: onbeforeunload = function() { return "To spowoduje zamknięcie aplikacji bez zapisu ewnetualnych zmian! Czy jesteś pewien?"; }; When I removed this line, the problem was solved. Chrome browser no more pops up message "Leave site? changes you made may not be saved.". This solves my problem. There are only two things I don't know: 1. This line no longer works before, but it didn't cause a problem in UniGui 1.90.0.1535 (2021). 2. Why does this line cause browser pops up message "Leave site? changes you made may not be saved." and not display this text "To spowoduje zamknięcie aplikacji bez zapisu ewnetualnych zmian! Czy jesteś pewien?" ?
  2. I've updated UniGui 1.90.0.1535 (2021) to 1.95.0.1580 (2024). Also I've updated Delphi 11 to 12 and EurekaLog to the latest. I didn't change the source codes. Also BackButtonAction is set to bbaDoNothing. Unfortunately now after upgrade always when use button "Logout" in my application (close session and main window) i see in the Chrome browser pops up message "Leave site? changes you made may not be saved.". Has anything changed? What did I miss?
×
×
  • Create New...