/    Sign up×
Community /Pin to ProfileBookmark

Anybody can make this CountDown script working?

Hello ?

I have a countdown script, who should count down to “March 1, 2006”.
Can anobody make this little script working?
I will be so happy ?

Here you can see the script:

<title>Timer Countdown In Page</title>
<!– –><SCRIPT>

<!–
// Browser Compatible for this script: IE 2.0 or Higher
// Netscape 2.0 or Higher

var theDay = new Date(“March 1, 2006”) //Date must be in the form Month Day, Year
var DayTill //The string that is going to put all numbers together and make sense.

function countdown()

{

var today = new Date() //Create a variable with today’s date
var second = Math.floor((theDay.getTime() – today.getTime())/1000) //Find the seconds
var minute = Math.floor(second/60) //Devide “second” into 60 to get the minutes
var hour = Math.floor(minute/60) //Devide “minute” into 60 to get the hours
var day = Math.floor(hour/24) //Devide “hour” into 60 to get the days

CDay= day //Correct day
CHour= hour % 24 //Correct hour, after devide into 24, the remainder deposits here.
CMinute= minute % 60 //Correct minute, after devide into 60, the remainder deposits here.
CSecond= second % 60 //Correct second, after devide into 60, the remainder deposits here.

if (CDay < 0 ) {CDay = “0”; CHour = “0”; CMinute = “0”; CSecond = “0”;} //Stop at 0

DayTill = CDay + ” Dager, ” + CHour + ” Timer, ” + CMinute + ” Minutter og ” + CSecond + ” Sekunder “

//Rewrite the string to the correct information.

document.clock.countdown.value = DayTill //Make the particular form chart become “Daytill”

var counter = setTimeout(“countdown()”, 1000)

}

//–>

</SCRIPT>
</head>

<body bgcolor=”#000000″>
<!– –><BODY onLoad = “countdown()” bgcolor=”#000000″> <! You must have countdown() here to run the script –>

<p align=”center”>

<FORM NAME = “clock”>

<p align=”center”>

<font face=”Verdana” style=”font-size: 10pt” color=”#FFFF00″>Det er </font>
<span style=”font-size: 3pt”>
<font face=”Verdana” color=”#FFFFFF”>
<INPUT NAME= “countdown” SIZE= “42” style=”border:1px solid #000000; padding:0px; font-family:Verdana; font-size:10pt; color:#FFFF00; background-color:#000000″></font><font face=”Verdana” color=”#FFFF00″> </font></span>
<font face=”Verdana” color=”#FFFF00″><span style=”font-size: 10pt”>til Påmeldingen
åpner!</span></font></FORM><font color=”#FFFF00″><!– –>

</font>

<p>&nbsp;</p>

</body>

</html>

to post a comment
JavaScript

1 Comments(s)

×

Success!

Help @starter spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...