inherit
41184
0
Mar 23, 2006 19:00:24 GMT -8
Dakota
114
May 2005
f15lc
|
Post by Dakota on Jun 25, 2005 17:01:29 GMT -8
I was just wondering whats the code for making a countdown from a certain date using an image in the background.
Dakota
|
|
inherit
Proboards Legend
212
0
May 11, 2006 12:32:55 GMT -8
california
21,035
December 1999
california
|
Post by california on Jun 25, 2005 22:49:46 GMT -8
<center><form style="margin-bottom:0px; margin-top: 0px;" id="countdown"><input id="counter" class="countdown" readonly="readonly" /></form></center>
<style type="text/css"> <!-- .countdown{ border-width: 0px; background-image: url(URL OF IMAGE); font-size: 30px; color: #004499; font-weight: bold; width: 400px; text-align: center; } --> </style>
<script type="text/javascript"> <!-- /* Countdown by california, ©2005, SoCal Codes */
//EDIT HERE var year="2005"; // [2005-20xx] var month="9"; // [1-12] var date="15"; // [1-31] var hour="3"; // [0-23]
var n=99; var temp=59; var days = [31,28,31,30,31,30,31,31,30,31,30,31];
function startcount(){ var d=new Date(); var time=new Array(); var q=parseInt(d.getYear())/4.0; if(q==Math.round(q)){days[1]=29;} time[0]=21-d.getDate(); var mbetween=month-1-parseInt(d.getMonth()); for(i=0;i<mbetween;i++){time[0]+=days[d.getMonth()+i];} time[1]=hour-d.getHours(); var ybetween=year-parseInt(d.getYear()); for(i=0;i<ybetween;i++){time[0]+=365; time[1]+=6;} time[2]=59-d.getMinutes(); time[3]=59-d.getSeconds(); if(temp!=time[3]){n=99} temp=time[3];n--; for(i=0;i<time.length;i++) if(time<10){time="0"+time} if(n<0){n+=100} nstr=n; if(n<10){nstr="0"+n} document.getElementById("counter").value=time[0]+':'+time[1]+':'+time[2]+':'+time[3]+'.'+nstr; setTimeout("startcount();",10); } startcount(); // --> </script>
|
|
inherit
38751
0
Jun 17, 2009 9:53:30 GMT -8
Dragonforce2005
They That Sow In Fear Shall Reap In Joy - Machine Head
1,055
March 2005
dragonforce2005
|
Post by Dragonforce2005 on Jun 26, 2005 4:44:33 GMT -8
|
|
crazyone
inherit
-666936
0
Dec 2, 2024 6:30:16 GMT -8
crazyone
0
January 1970
GUEST
|
Post by crazyone on Jun 26, 2005 6:05:28 GMT -8
don't hijack someone's thread, you have your own threads (2) about this!!!! but here it is: <head> <script LANGUAGE="JavaScript"> <!-- // Javascript Countdown // Version 1.0 1/20/2000 // by TDavid at http://www.tdscripts.com/ var now = new Date(); var event = new Date("Sep 29 2001 00:00:01"); var seconds = (event - now) / 1000; var minutes = seconds / 60; var hours = minutes / 60; var days = hours / 24; ID=window.setTimeout("update();", 1000); function update() { now = new Date(); seconds = (event - now) / 1000; seconds = Math.round(seconds); minutes = seconds / 60; minutes = Math.round(minutes); hours = minutes / 60; hours = Math.round(hours); days = hours / 24; days = Math.round(days); document.form1.days.value = days; document.form1.hours.value = hours; document.form1.minutes.value = minutes; document.form1.seconds.value = seconds; ID=window.setTimeout("update();",1000); } // --></script> </head> <body> [color=red]<table border="1">[/color] <p><font face="Arial" size="3">Countdown To September 29, 2001, at 12:00: </font></p> <form name="form1"><p>Days <input type="text" name="days" value="0" size="3"> Hours <input type="text" name="hours" value="0" size="4"> Minutes <input type="text" name="minutes" value="0" size="7"> Seconds <input type="text" name="seconds" value="0" size="7"> </p> [color=red]</table>[/color] </form>
</body> </html>
|
|
inherit
41184
0
Mar 23, 2006 19:00:24 GMT -8
Dakota
114
May 2005
f15lc
|
Post by Dakota on Jun 26, 2005 13:00:43 GMT -8
Thanks so much California. Dakota
|
|
swec74
New Member
YAY!!!! PBv4 :D
Posts: 40
inherit
35231
0
Oct 24, 2005 10:08:55 GMT -8
swec74
YAY!!!! PBv4 :D
40
January 2005
swec74
|
Post by swec74 on Jun 27, 2005 13:44:28 GMT -8
(sorry if this is classed as hijacking the thread) how come when i use that code when u reply to a post none of the buttons to format it (such as glow n them) dont work?
|
|