Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer

Mobile
feeds
Welcome Login | Register

Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » Javascipt Forums
        » » Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
Post Description: javascript countdown timer code and script tutorial guide javascript timer Javascipt
Post Tags:
This Post Has Been Viewed 9186 Times Since Mon Dec 04, 2006 7:40 pm Author bigger_travis with 4 replies
Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
Advertise On This Page




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

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer

Comments and replies About Javascript Countdown Timer Code and Script Tutorial Guide Javascript Timer
:: 1 :: Reply #59279 Reply By Joao On Wed Jun 25, 2008 6:13 am
Joao:
great stuff but let's imagine if i want 2/3 timers at the same page. what to do?
:: 2 :: Reply #76289 Reply By steve On Sun Oct 19, 2008 3:22 pm
steve:
yes, i was looking for a simple javascript countdown and i found it, thanks
:: 3 :: Reply #91506 Reply By java On Sun Jan 25, 2009 8:47 pm
java:
25-545-javascript-newbie.jpg
you are just amazing man, ive been loooking for something like this and i was able to find it, keep up the good work
:: 4 :: Reply #99815 Reply By tum On Wed Apr 08, 2009 9:50 pm
tum:
amazing for imagine