|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Prompt window
how can i made a prompt window appears after 1 minute of window no events?
it should appear everytime users take no action (key or mouse) during a certain time (eg 1 minute). i found timeout() but i cant associate it with window events. can anyone help me with this one? thanks |
|
#2
|
||||
|
||||
|
Here is a script I made that will redirect the browser if the user is
inactive for 5 seconds. Should be easy enough for you to adapt it to suite your needs... Code:
<script type="text/JavaScript">
var timer;
if (document.all)
{
document.onmousemove=resetTimer;
document.onkeypress=resetTimer;
}
else
{
window.onmousemove=resetTimer;
window.onkeypress=resetTimer;
}
function resetTimer()
{
clearTimeout(timer);
timer=setTimeout("pageTimeout()",5000);
}
function pageTimeout()
{
window.location.replace("http://www.google.co.uk") ;
}
window.onload=resetTimer;
</script>
__________________
Sinthetic - Alternative UK Hiphop: What's the worst that could happen? |
|
#3
|
|||
|
|||
|
i made the modification and it works fine, thanks...now a bigger prob. is it possible to made a password type in the prompt window? instead appears the letter, number it appears * or any other symbol?
thnaks |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Prompt window |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|