In Progress

Javascript adjustment based on idle

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;

[url removed, login to view] = resetTimer;

[url removed, login to view] = resetTimer; // touchscreen presses

[url removed, login to view] = resetTimer;

[url removed, login to view] = resetTimer; // touchpad clicks

[url removed, login to view] = resetTimer; // scrolling with arrow keys or scrollbar

function logout()

{

[url removed, login to view]("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) {[url removed, login to view]("welcome back, resuming 5s"); myvar=livefunc();}

}

</script>

Skills: AJAX, Javascript, jQuery / Prototype

See more: I need a script written that i can run on, I need a script written that i can run on a wind, I need a script written that i can run on a windows PC to rename 30,000 images from its existing name to another. -- 2, i need python script, i need a script writer, i need a phphtml script mp3, i need a php/html script mp3, i need a php script for ecurency business, i need a logo based on my partial design, i need a executive producer uk based, i need a christmas and new year ecard for my prague czech republic based travel business the text needs to be editable i will ne, i need 3d model the interior of the apartment attached dwg drawing based on developed 3d model, i need 3d model the interior of the apartment (attached dwg drawing) based on developed 3d model, i have an existing phpmysql script that i need customized with additional functions, i have an existing php/mysql script that i need customized with additional functions, electronics based military projects open bid, javascript text based rpg game, javascript image based drop menu, free menu design javascript image based, javascript country based redirection, javascript image based drop menus, based library management system bid, javascript text based rpg, javascript web based sql report generator sample, use javascript redirect based geo

About the Employer:
( 23 reviews ) sg, Singapore

Project ID: #15453635

Awarded to:

shiva1977

A proposal has not yet been provided

$10 USD in 1 day
(7 Reviews)
2.2

11 freelancers are bidding on average $18 for this job

aryan151

15I have 9 years of exp........................................... Relevant Skills and Experience Javascript Proposed Milestones $15 USD - Done

$15 USD in 1 day
(91 Reviews)
5.4
glennwilkins

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 ...

$15 USD in 0 days
(41 Reviews)
4.7
liviuconcioiu

I bidded $15, but please allow me a few minutes to get it done. Relevant Skills and Experience Portfolio Proposed Milestones $15 USD - Milestone

$15 USD in 1 day
(5 Reviews)
3.2
SmartBros

JavaScript jQuery expert here .. Ready to start the work once we got complete details :)

$25 USD in 1 day
(3 Reviews)
2.3
rohitmittal18

Hello Friend, This is a POC link of your requirement [url removed, login to view] . We can customize it according to your requirement. I am just looking for long tern relation :) Relevant Skills and Expe More

$15 USD in 1 day
(2 Reviews)
1.5
$25 USD in 1 day
(0 Reviews)
0.0
AhsanMehmood234

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 More

$15 USD in 0 days
(0 Reviews)
0.0
Tanglingyun

I think I can help you achieve it, please sir。believe me

$19 USD in 1 day
(0 Reviews)
0.0
HammuMemon

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 l More

$15 USD in 1 day
(0 Reviews)
0.0
vikash0402

A proposal has not yet been provided

$30 USD in 1 day
(0 Reviews)
0.0