I have the below script to calculate inactive time,i put this code in master page and the pages which are not consuming master page.if user takes any action in the page(without master page) this inactive time has to be reset to 0.
My main goal to achieve is inactive time of the user in the application should be same in master page and in pages(without master page).how to do this?
var idleTime = 0;
$(document).ready(function () {
debugger;
//Increment the idle time counter every minute.
var idleInterval = setInterval(timerIncrement, 60000); // 1 minute
var menu = $("<%=RadMenu1.ClientID%>").find("_m0_m1");
//Zero the idle timer on mouse movement.
$(this).mousemove(function (e) {
idleTime = 0;
});
$(this).keypress(function (e) {
idleTime = 0;
});
});
function timerIncrement() {
idleTime = idleTime + 1;
}
Go to the complete details ...