trying out my countdown timer!

This would be a great thread for our Tech Support board. I'll move you there. :) Thanks for posting.
 

Hoping this works... second try!!
 
Where did everybody get those count downs?
 
<a href="http://www.disboards.com/showthread.php?s=&threadid=195411">Click here</a>
 
Code:
<Script language='Javascript'>
<!--
//Countdown Timer v2.0
//Written by: James M. Venglarik, II
//Created on: March 28, 2002
var rndNum = Math.floor(Math.random() * 10000);
eval("var CDTDate" + rndNum + " = 'November 20,2002 9:00:00 PM EST';");
document.writeln("<form name='CDTform" + rndNum + "' action='Javascript:void(0);'>");
document.writeln('<font size=2 color=darkblue>Countdown till my trip to WDW!!</font><br>');
document.writeln("<input type=text value='' size=40 name='countdown'>");
document.writeln("</form>");
if (theFunction) 
theFunction += "var d = new Date();";
else 
var theFunction = "var d = new Date();";
theFunction += "var c = new Date('" + eval("CDTDate" + rndNum) + "');";
theFunction += "var tzo = (c.getTimezoneOffset() - d.getTimezoneOffset()) * 60;";
theFunction += "var diff = ((c - d)/1000) + tzo;";
theFunction += "var days = Math.floor(diff / 86400);";
theFunction += "var rem = diff - (days * 86400);";
theFunction += "var hours = Math.floor(rem / 3600);";
theFunction += "rem = rem - (hours * 3600);";
theFunction += "var minutes = Math.floor(rem / 60);";
theFunction += "rem = rem - (minutes * 60);";
theFunction += "var seconds = Math.floor(rem);";
theFunction += "if ((days < 0) | (hours < 0) | (minutes < 0) | (seconds < 0)) ";
theFunction += "var out = 'I\\\'m there!!';";
theFunction += "else ";
theFunction += "var out = ' ' + days + ' days ' + hours + ' hrs. ' + minutes + ' mins. ' + seconds + ' secs.';";
theFunction += "document.forms.CDTform" + rndNum + ".elements.countdown.value = out;";
setInterval(theFunction, 1000);
//-->
</Script>
 















Receive up to $1,000 in Onboard Credit and a Gift Basket!
That’s right — when you book your Disney Cruise with Dreams Unlimited Travel, you’ll receive incredible shipboard credits to spend during your vacation!
CLICK HERE













DIS Facebook DIS youtube DIS Instagram DIS Pinterest DIS Tiktok DIS Twitter DIS Bluesky

Back
Top