Jump to content

Countdown thingy?


MarvieN

Recommended Posts

I'm seriously wanting to add one of those countdown doohickies to my blog, can anyone out there give me any advice (meaning walk me through it bc I'm just not getting it rofl) on setting one up, and also recommend a good one? I'd like to have two countdowns on my page, one for christmas and one for the date we expect to leave here for the States. I'd be so grateful if anyone can help me out!

 

Thanks =)

Link to comment
Share on other sites

I'm seriously wanting to add one of those countdown doohickies to my blog, can anyone out there give me any advice (meaning walk me through it bc I'm just not getting it rofl) on setting one up, and also recommend a good one? I'd like to have two countdowns on my page, one for christmas and one for the date we expect to leave here for the States. I'd be so grateful if anyone can help me out!

 

Thanks =)

Hello, I actually use two of them on my page,

the first one is from ticketcentral, it's free and very easy : just register, create your ticket, get the html code and past it where you wnat it to be in your page.

6

You can also try ticket factory

 

 

 

 

 

the other one is a javascript file, it's a countdown from now to christmas, I modified it for it to be written in French (see the bottom of my page "84 jours avant Noël !)

 

you can either right click on my page and copy the code source for the javascript (this is something I do very often when I see something I like, I just mention where I found it in the source code of my page) or... here it is, in modified back in English, just copy and past it where you want it to be in your page! :)

 

<!-- countdown-->

<SCRIPT LANGUAGE="JavaScript">

<!-- Original: Alan Palmer -->

<!-- Web Site: http://www.jsr.communitech.net -->

 

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

 

<!-- Begin

var date = new Date("December 25, 2005");

var description = "Christmas!";

var now = new Date();

var diff = date.getTime() - now.getTime();

var days = Math.floor(diff / (1000 * 60 * 60 * 24));

document.write("<center><h3>")

if (days > 1) {

document.write(days+1 + " days before " + description);

}

else if (days == 1) {

document.write("Only two days left before " + description);

}

else if (days == 0) {

document.write("Tomorrow is " + description);

}

else {

document.write("It's" + description + "!");

}

document.write("</h3></center>");

// End -->

</script>

<!-- Script Size: 1.16 KB -->

 

have fun!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...