Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Time Dynamically

Status
Not open for further replies.

yogi77

Programmer
Oct 12, 2001
25
0
0
GB
Using VBScript, ASP, SQL Server 7.0

I am trying to display a countdown on screen to the users in the format of "10:34:44 remaining" however, I would like to change this every second (a bit like you see on the auction sites, with times counting down). Can anyone offer suggestions for the best way to perform this? I would really like to perform this client-side rather than tripping round each time.

Any help is much appreciated.

TIA,
Yogi "Let us not condemn ignorance, let us condemn reluctance to share"
 
function countDown() { var el = document.all.howMany el.innerText--
if (0<=el.innerText) setTimeout(&quot;countDown()&quot;,1000) else {
// Replace following with custom action. el.innerHTML = &quot;Do Action Now&quot;
// The following line is only necessary to reenable the &quot;Go&quot; button
document.all.go.disabled=false; } }

or do a search on countdown timers javascript Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top