PDA

View Full Version : once again i need help on the same topic!!!


cat_evilness
08-13-2002, 05:19 AM
okay guys, just so you understand exactly what i want to do, here it is again:

i need to have a script that prints out the number 10 then a second later prints out 9 and then another second later 8 and so on.. like a count down!! I'm not exactly sure if this is possible and I would have no idea how to program this myself so please please please help me. Everytime people give me code I either have no idea how to put it into the page I want or it comes up with an error message so I must be doing something wrong. So below I have added the HTML for the page and if anyone knows could they please put the code I need to do this function into the code below:


<html>
<head>
<title>Virtual Pet</title>
</head>
<body bgcolor="#FF9900" text="#ffffff" link="#00ff00" alink="#ffa500" vlink="#ff0000">
<basefont size="3">
</body>
</html>

thankyou so much
cat :D

zoobie
08-13-2002, 05:23 AM
So, what code did they give you before? :rolleyes:

An animated gif would work, too.

PS - This title is about as useful as "help". Please post specifically in your title (e.g. countdown script).

cat_evilness
08-13-2002, 05:33 AM
sorry, i will try to remember that for next time. They said:

document.getElementById("countdown").innerHTML = i;

and that i should have this somewhere on the page:

<div id="countdown"></div>

I had no idea what to do with this or where to put it, please help me!!

zoobie
08-13-2002, 06:05 AM
Countdown (http://geocities.com/zoobie007/countdown.html)

Skyzyx
08-13-2002, 06:11 AM
This works. I wrote it in 90 seconds, and I just tried it.

<html>
<head>

<script language="javascript">
<!--
var countdownValue='10';

function countdownScript()
{
var showCountdown=document.getElementById('countdown');
showCountdown.innerHTML=countdownValue;

setTimeout("countdownScript();", 1000);

countdownValue--;
}
//-->
</script>

</head>

<body>
<span id="countdown"></span>

<script language="javascript">
<!--
countdownScript();
//-->
</script>

</body>
</html>

cat_evilness
08-13-2002, 06:31 AM
hey guys,

thanks sooooooo much

cat xx