countdowns |
![]() ![]() |
countdowns |
Sep 3 2004, 09:13 PM
Post
#1
|
|
|
Newbie ![]() Group: Member Posts: 1 Joined: May 2004 Member No: 17,993 |
where do i get a count down thingy for my xanga and how do i add it in.?
|
|
|
|
Sep 3 2004, 10:10 PM
Post
#2
|
|
![]() I never give 4/10 ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 627 Joined: Aug 2004 Member No: 45,375 |
I found this in Dynamic Drive. Put in in custom header.
CODE <!-- begin code provided by createblog.com --> <script language="JavaScript1.2"> //Dynamic countdown Script II- © Dynamic Drive (www.dynamicdrive.com) //Support for hour minutes and seconds added by Chuck Winrich (winrich@babson.edu) on 12-12-2001 //For full source code, 100's more DHTML scripts, visit http://www.dynamicdrive.com function setcountdown(theyear,themonth,theday,thehour,themin,thesec){ yr=theyear;mo=themonth;da=theday;hr=thehour;min=themin;sec=thesec } //////////CONFIGURE THE COUNTDOWN SCRIPT HERE////////////////// //STEP 1: Configure the countdown-to date, in the format year, month, day, hour(0=midnight,23=11pm), minutes, seconds: setcountdown(2004,12,07,18,30,00) //STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively var occasion="Bulls vs Lakers game" var message_on_occasion="Go Chicago Bulls!" //STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area var countdownwidth='520px' var countdownheight='35px' var countdownbgcolor='lightyellow' var opentags='<font face="Verdana"><small>' var closetags='</small></font>' //////////DO NOT EDIT PAST THIS LINE////////////////// var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") var crosscount='' function start_countdown(){ if (document.layers) document.countdownnsmain.visibility="show" else if (document.all||document.getElementById) crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie countdown() } if (document.all||document.getElementById) document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'"></span>') window.onload=start_countdown function countdown(){ var today=new Date() var todayy=today.getYear() if (todayy < 1000) todayy+=1900 var todaym=today.getMonth() var todayd=today.getDate() var todayh=today.getHours() var todaymin=today.getMinutes() var todaysec=today.getSeconds() var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec futurestring=montharray[mo-1]+" "+da+", "+yr+" "+hr+":"+min+":"+sec dd=Date.parse(futurestring)-Date.parse(todaystring) dday=Math.floor(dd/(60*60*1000*24)*1) dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1) dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1) dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1) //if on day of occasion if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){ if (document.layers){ document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags) document.countdownnsmain.document.countdownnssub.document.close() } else if (document.all||document.getElementById) crosscount.innerHTML=opentags+message_on_occasion+closetags return } //if passed day of occasion else if (dday<=-1){ if (document.layers){ document.countdownnsmain.document.countdownnssub.document.write(opentags+"Occasion already passed! "+closetags) document.countdownnsmain.document.countdownnssub.document.close() } else if (document.all||document.getElementById) crosscount.innerHTML=opentags+"Occasion already passed! "+closetags return } //else, if not yet else{ if (document.layers){ document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags) document.countdownnsmain.document.countdownnssub.document.close() } else if (document.all||document.getElementById) crosscount.innerHTML=opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags } setTimeout("countdown()",1000) } </script> <ilayer id="countdownnsmain" width=&{countdownwidth}; height=&{countdownheight}; bgColor=&{countdownbgcolor}; visibility=hide><layer id="countdownnssub" width=&{countdownwidth}; height=&{countdownheight}; left=0 top=0></layer></ilayer> <!-- end code provided by createblog.com --> - Tran - |
|
|
|
Sep 3 2004, 10:52 PM
Post
#3
|
|
![]() hi, my name is brianna! =] ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 5,764 Joined: Jun 2004 Member No: 22,114 |
Please check in Xanga Scripts before you ask for a certain script or code.
CODE <!-- begin code provided by createblog.com --> <!-- begin code provided by createblog.com --> </tr><script language="JavaScript1.2"> var today = new Date; var Future0 = new Date; var BirthMonth = 6; var BirthDate = 20; var BirthYear = 1987; BirthMonth--; Future0.setMonth(BirthMonth, BirthDate); if (Date.parse(today) > Date.parse(Future0)) { Future0.setFullYear(today.getYear()+1); age = (today.getYear() - BirthYear) + 1; } else {age = today.getYear() - BirthYear;} if (age % 10 == 0) ageend = 'th'; else if (age % 10 == 4) ageend = 'th'; else if (age % 10 == 5) ageend = 'th'; else if (age % 10 == 6) ageend = 'th'; else if (age % 10 == 7) ageend = 'th'; else if (age % 10 == 8) ageend = 'th'; else if (age % 10 == 9) ageend = 'th'; else if (age % 10 == 1) ageend = 'st'; else if (age % 10 == 2) ageend = 'nd'; else if (age % 10 == 3) ageend = 'rd'; var faraevent = "<font color=#99CC33><i>my birthday</font>"; today1 = Date.parse(today); future1 = Date.parse(Future0); secleft = future1 - today1; miliday = 24 * 60 * 60 * 1000; daysleft = secleft/miliday; daysleftint = Math.round(daysleft); if (daysleftint > 1) document.write(" ", daysleftint, " days until <font color=#99CC33>my <i>", age, ageend, "</i> birthday</font>"); else if (daysleftint == 1) document.write("<font color=#99CC33>my <i>", age, ageend, "</i> birthday</font> is tomorrow"); else if (today1 == future1) document.write("<font color=#99CC33>my <i>", age, ageend, "</i> birthday</font> is today"); else document.write("passed"); </script><br> <!-- end code provided by createblog.com --> <!-- end code provided by createblog.com --> (http://www.createblog.com/forums/index.php?showtopic=2846) |
|
|
|
Nov 24 2004, 11:19 PM
Post
#4
|
|
![]() ٩(͡๏̯͡๏)۶ ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 14,309 Joined: Nov 2004 Member No: 65,593 |
ehehe . i notice the html . has "Chicago vs Lakers. lol!
|
|
|
|
| *mona lisa* |
Nov 25 2004, 07:18 PM
Post
#5
|
|
Guest |
QUOTE ehehe . i notice the html . has "Chicago vs Lakers. lol! lol yeah but you can change it to whatever you want. |
|
|
|
![]() ![]() |