Main Page Beginners Design Tips Get Traffic Earn Money Picks Codes

Are you a Successful Blogger?

Successful Blogging

  • Beginners can learn the basics about Blogging
  • Advanced Bloggers can learn how to take their blog up a notch.
  • Anyone can learn HOW TO GET MORE TRAFFIC
  • And more- Templates, Codes, and Tips etc.

What do you want to read about? Scroll down or check out our sidebar for topics.

We post at least daily so check back or subscribe to our newsletter.

Successful Blogging.com

Add a Countdown to your Blog

How many more days until New Years Day- January 1 2009?







Here is some nifty script that you can copy and paste to make your own countdown.
The easiest way to do this in Blogger is to go to your layouts tab, click on add a page element and then add this as html.
You will need to alter the bolded red items to fit your needs.


<script>


//change the text below to reflect your own,
var before="New Years!"
var current="Today is New Years! Happy 2009"

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countdown(yr,m,d){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var futurestring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)
if (difference==0)
document.write(current)
else if (difference>0)
document.write("Only "+difference+" days until "+before)
}
//enter the   date you are counting down to using the format year/month/day
countdown(2009,1,1 )

</script>


0 comments: