I want to automatically after being sometimes idle by the user but not being able to do.I has used follwing javascript but nothing is going on and I have also add session timeout in web config but its also not working.Please give me some ideas.
<script type="text/javascript">
var timer1, timer2;
document.onkeypress=resetTimer;
document.onmousemove=resetTimer;
function resetTimer()
{
document.getElementById('timeoutPopup').style.display='none';
clearTimeout(timer1);
clearTimeout(timer2);
// waiting time in minutes
var wait=10;
// alert user one minute before
timer1=setTimeout("alertUser()", (60000*wait)-1);
// logout user
timer2=setTimeout("logout()", 60000*wait);
}
function alertUser()
{
document.getElementById('timeoutPopup').style.display='block';
}
function logout()
{
window.location.href='Logout.aspx';
}
}
</script>