PDA

View Full Version : Universal Countdown after the event time



spoonervt
02-28-2008, 06:41 PM
1) Script Title:
Universal Countdown
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex6/universalcountdown.htm
3) Describe problem:

I have this script counting down and then at the end fwds to another URL by way to window.location="newpage.html";
I am trying to add an if else to this script so that once the event date passes the script automatically:

example:
if (time now is past the script end time)
{window.location="newpage.html";}

else{
var launchdate=new cdLocalTime("cdcontainer", "server-asp", 120, "February 29, 2008 15:51:50")
launchdate.displaycountdown("days", formatresults2)
}


how can I use the server time that is used in the main script in the first if () statement?

if (now() = launchdate)?

or can I use
if (this.timesup==true)
?

thanks
Jon

Nile
02-29-2008, 12:09 AM
I hink that you would need to do it here:

}
else{ //else if target date/time met
var displaystring="Launch time!"
}