Click here to Skip to main content
15,896,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
How set time interval for 15 mins in javascript,i will use (var logouTimeInterval = 3000; // Three Second fro 3 sec) and it will work,i can set upto 10 secs,but i can set 1,2,3... mins,
pls reply me how to set 15 mins time interval in javascript.

Regards
Aravind
Posted
Comments
CHill60 3-Jun-13 4:18am    
Your question is not clear. If you can set up to 10 seconds why can't you set it for a longer interval?
Aravindba 3-Jun-13 4:45am    
we can set time intrval for 1,2,3.... can use only var logouTimeInterval = 15 * 60 * 1000; like this,if below 10 secs or 20 secs can use var logouTimeInterval = 3000; .ok now understand,this problem solve by Tadit Dash.
Thanx for ur reply also
Regards
Aravind

1 solution

Refer - Javascript settimeout[^].
Quote:
You could use the setInterval function if you want it to run repeatedly:
JavaScript
setInterval(function() {
    alert('hello world');
}, 15 * 60 * 1000);

Also you might take a look at the jquery idleTimer plugin which allows you to detect periods of user inactivity and take some actions.

So, do like below.
JavaScript
var logouTimeInterval = 15 * 60 * 1000;
 
Share this answer
 
Comments
Aravindba 3-Jun-13 4:42am    
Thank u for ur reply it will,thanx
Regards
Aravind
Most Welcome. My Pleasure... :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900