here you go...
function showTime(ConfigDefault)
{
if ( document.timer.timer.value.length == 0 )
{
var date = new Date();
document.timer.timer.value = date.getTime();
}
var timeNow = parseInt( document.timer.timer.value );
timeEnd = new Date( timeNow + 60*60000 );
var timeRemainingString = "";
var timeNow = new Date();
var time = Math.floor( (timeEnd.getTime() - timeNow.getTime()) / 1000.0 );
timeOut = 0;
if (time < 0)
{
alert("Your session has timed out.");
stopTimer();
}
else
{
hours = Math.floor( time /3600) % 24;
minutes = Math.floor( time / 60) % 60;
seconds = (time%60);
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
timeRemainingString = minutes + ":" + seconds;
timeOut = 1000;
document.timer.clock.value = timeRemainingString;
timerID = setTimeout("showTime(60)",1000);
timerRunning = true;
}
}
</script>
-----Original Message-----
From: Nick Lansbury [mailto:[EMAIL PROTECTED]
Sent: 16 June 2003 16:04
To: FarCry Developers
Subject: [farcry-dev] countdown to session timeout
i'm working remotely so i don't have any code in front of me, nor do i
have a farcry app in front me but i seem to recall a display on screen
showing how much time until the session times out.
can someone post this chunk of code?
TIA,
N.
---
You are currently subscribed to farcry-dev as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]