Hello Jeevan,
Refer the below code :
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Popup Sample App</title>
<script type="text/javascript">
var timeout = 60; //seconds
var counter = 0;
document.onclick = function () {
counter = 0;
};
document.onmousemove = function () {
counter = 0;
};
document.onkeypress = function () {
counter = 0;
};
window.setInterval(CheckIdleTime, 1000);
function CheckIdleTime() {
counter++;
var oPanel = document.getElementById("SecondsUntilExpire");
if (oPanel)
oPanel.innerHTML = (timeout - counter) + "";
if (counter >= timeout) {
alert("You've been idle for 1 minute!");
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
Hope this will help you. You can change the timeout as per your requirement.
Regards,
Nirav Lalan
DNS Gold Member
"If you can dream it, you can do it."