hi sir,
Session is not working in grid while trying to use my own session function.
For Example
<script>
var timoutWarning = 84000; // Display warning in 14 Mins.
var timoutNow = 84000; // Timeout in 15 mins.
//var timoutWarning = 30000; // Display warning in 14 Mins.
//var timoutNow = 31000; // Timeout in 15 mins.
var logoutUrl = 'logout.php'; // URL to logout page.
var warningTimer;
var timeoutTimer;
// Start timers.
function StartTimers() {
warningTimer = setTimeout("IdleWarning()", timoutWarning);
timeoutTimer = setTimeout("IdleTimeout()", timoutNow);
//alert(warningTimer);
//alert(timeoutTimer);
}
// Reset timers.
function ResetTimers() {
clearTimeout(warningTimer);
clearTimeout(timeoutTimer);
StartTimers();
$("#timeout").dialog('close');
//alert(warningTimer);
//alert(timeoutTimer);
}
// Show idle timeout warning dialog.
function IdleWarning() {
$("#timeout").dialog({
modal: true
});
}
// Logout the user.
function IdleTimeout() {
window.top.location.href = logoutUrl;
}
</script>
<body onload="StartTimers();" onmousemove="ResetTimers();" onchange="ResetTimers();" onInput="ResetTimers();">
Thank you
I tested your code and is working as expected.
https://gist.github.com/gridphp/f18b8aed638796ba2916729dd283269f
I updated warning time to 10s and logout time to 20s for testing purpose.