I need to adjust the below script to call an ajax function based on the idle time of the user. It is currently not functioning properly. This is similar to banking websites but in this case, i dont want the logout, i just want to adjust the rate of calling the ajax.
Here are the rules:
1. If user is idle for 3 mins, adjust livefunc to 15 secs
2. If user is idle for 5 mins, adjust livefunc to 30 secs
3. Whenever the user is back, adjust livefunc to 5 secs and reset timer
4. You are expected to complete this in a few hours and show a working example in jsfiddle.
5. I'm looking to establish a long term relationship with you. I have many other stuff like this, including UI, mobile, jquery etc
6. Please do not bid more than $15 or it will be ignored. I know i can get this done for free in stackoverflow but as mentioned, I want to build a relationship
<script type="text/javascript">
var t;
window.onload=resetTimer;
document.onkeypress=resetTimer;
[login to view URL] = resetTimer;
[login to view URL] = resetTimer; // touchscreen presses
[login to view URL] = resetTimer;
[login to view URL] = resetTimer; // touchpad clicks
[login to view URL] = resetTimer; // scrolling with arrow keys or scrollbar
function logout()
{
[login to view URL]("idle 3 mins, change to 15s");
clearTimeout(myvar);
myvar=null;
myvar=setTimeout(livefunc(),15000);
}
function resetTimer()
{
clearTimeout(t);
t=setTimeout(logout,8000); //logout in 5 minutes
if (myvar === null) {[login to view URL]("welcome back, resuming 5s"); myvar=livefunc();}
}
</script>
sir pm me im good in javascript ...$15
Relevant Skills and Experience
javascript
Proposed Milestones
$15 USD - sir pm me im good in javascript ...
sir pm me im good in javascript ...
I am Software Engineer in C# .NET, ASP.NET MVC, HTML5, CSS3.0, JavaScript, jQuery. I can do this project in few and want to build long relationship. Inbox me if you want to work with me.
Relevant Skills and Experience
AJAX, Javascript, jQuery, HTML5, ASP.NET
Proposed Milestones
$15 USD - Delivery of working Script.
We will give you the best result by using my Past experience and excellent skills on your project.
You can chat with me and let's get started,
Relevant Skills and Experience
I have been working software house from last 2 years
Proposed Milestones
$15 USD - Project Milestones