From: Michael Rasmussen Date: Wed, 3 Jun 2015 18:50:04 +0000 (+0200) Subject: reload page when session expire X-Git-Url: http://git.datanom.net/qtadmin.git/commitdiff_plain/ca65135681134d822af468e64336138556ee901d reload page when session expire --- diff --git a/js/timer.js b/js/timer.js index 5760242..092213d 100644 --- a/js/timer.js +++ b/js/timer.js @@ -7,13 +7,13 @@ function myTimer() { var expire = timeStart - elapsed; var timeLeft = Math.round(((expire % 86400000) % 3600000) / 60000); - if (timeLeft < 0) { + if (timeLeft < 1) { /*timeLeft = 'Expired'; document.getElementById("time").style.background = "red";*/ clearInterval(timerRef); location.reload(); } else { - timeLeft += 1; + //timeLeft += 1; timeLeft = '< ' + timeLeft + ' min'; }