Page redirection after inactivity

S

sconeek

hi all,
i am trying to implement a page re-direction after a certain amount of
inactivity. can somebody please help me in this. i was thinking could i
display a screensaver using JavaScript after some time of inactivity
and if the user moves their mouse or keyboard return to normal screen.
otherwise after certain inactivity redirect the user to a different
page.

can somebody guide me in this approach.
thanks.
 
M

mouseit101

Yeah use events and a timer. Start the timer, and redirect at the end
of it, if an event occurs cancel the timer and reset it.
 
M

mouseit101

More spcifically something like:

var t
function setupTimer() [on the onload event of a browser]
{
t = setTimeout("window.loaction='[URL here]' " , [Time in milliseonds
until it goes off ex: 1000 is one second])
}

function interruptTimer() [set on the events to regerstering as
activity]
{
clearTimeout(t)
t = setTimeout("window.loaction='[URL here]' " , [Time in milliseonds
until it goes off ex: 1000 is one second])
}

I havent tested that but it gives yo a general idea.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top