Javascript Countdown Timer Code And Script Tutorial Guide Javascript Timer



Javascript Countdown Timer Code And Script Tutorial Guide Javascript Timer
 (328) Domains for just $1.99 1751586
Javascript Countdown Timer Code And Script Tutorial Guide Javascript Timer
Post Description:
Post Tags: javascript, countdown, timer, code, and, script, tutorial, guide, javascript, timer
This Post Has Been Viewed 6353 Times Since Mon Dec 04, 2006 7:40 pm Posted By bigger_travis with 1 replies
Javascript Countdown Timer Code And Script Tutorial Guide Javascript Timer
This is a simple script that will show you how a countdown timer works with javascript:

to make it work, just do this:

1. copy and paste the code below into your editor, you can use notepad.exe in windows if you don't have a website editor.


     Code:
<p>This simple tutorial code is to show you how javascript can help you display a simple timer, you can get more complicated even if you want to display dates.</p>
<h1 align="center">
<script language="JavaScript">
var countDownInterval=5;
var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location="http://www.wallpaperama.com";
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){ //CHANGE TEXT BELOW TO YOUR OWN
document.c_reload.document.c_reload2.document.write('Launching in <b id="countDownText">'+countDownTime+' </b> seconds')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}

function startit(){
if (document.all||document.getElementById) //CHANGE TEXT BELOW TO YOUR OWN
document.write('Launching in <b id="countDownText">'+countDownTime+' </b> seconds')
countDown()
}

if (document.all||document.getElementById)
startit()
else
window.onload=startit
setTimeout("location.href='http://www.wallpaperama.com'" , t)
</script>
</h1>
<p align="left">HELP! - If you've found this script helpful, we would appreciate a link to wallpaperama.com. Linking to wallpaperama will make script like this more available to poeple who are looking for help, just like you. Thanks </p>
<p align="center">Script Code at <a href="http://www.wallpaperama.com">Wallpaperama.com </a></p>


2. Once you have copy and paste the code above, save the file as wallpaperama-timer.html

3. After you have saved it, open it with your browser

post picture

4. that's it, if you wan to see it in action, click on the link below where it says demo:

CLICK HERE TO SEE DEMO

Hope this helps

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About Javascript Countdown Timer Code And Script Tutorial Guide Javascript Timer




:: 1 :: #59279 - Reply By Joao Beca On Wed Jun 25, 2008 6:13 am
great stuff but let's imagine if i want 2/3 timers at the same page. what to do?