|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Continous Countdown
Hey,
Right now I'm trying to make a timer that counts down every 3 hours, then for like 20mins it says "Active", then it goes back to the countdown of 3 hours and then "Active" and have it just loop that. Right now I can get the countdown (Sorta, I got the normal countdown then "Active", still doesn't loop though), but how do I make it so the countdown doesn't reset every page load? I'm guessing I'd need to do something with SQL to store the time on the server, but thats a guess... Anyone able to help? |
|
#2
|
||||
|
||||
|
Quote:
Yes, post your code.
__________________
------------- vbrtrmn -------------- i think i'm missing some vowels here ------------------------------------ ---------- js.antinoc.net ---------- ------------------------------------ --- The Two Types of Programmers --- |
|
#3
|
|||
|
|||
|
Quote:
Here is old version, only dif are the times. I've got to go to San Fran for a little while, but I'll be back in a few hours. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <table width="127" border="0" align="center"> <tr> <td width="70"><div align="center"><code><a href="index.php?op=devilsquare" target="_self"> FoJ:</a></code></div></td> <td width="49"><div align="left"><code><span class="Estilo3" id="timespan"> <script> var dods; var minute = 17;var secundes = 44;dsin = minute * 60 + secundes; function changeeventtime() { dsin = dsin + 1; dods = 55*60 - dsin; min = Math.floor(dods/60); sec = dods%60; if(dods < 0) { document.getElementById("timespan").innerHTML="Active"; } else { if(min < 10) min = "0"+min; if(sec < 10) sec = "0"+sec; document.getElementById("timespan").innerHTML=min+":"+sec; } window.setTimeout("changeeventtime()",1000); } changeeventtime(); </script> </span> <br /> <span class="Estilo2"></span></code></div></td> </tr> </table> </body> </html> |
![]() |
| Viewing: Dev Shed Forums > Web Design > JavaScript Development > Continous Countdown |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|