View Full Version : Help with Countdown Script

03-30-2010, 06:51 PM

I am a big novice when it comes to Script, and I copied and pasted the script for the Universal Countdown http://www.dynamicdrive.com/dynamicindex6/universalcountdown.htm however, it just displayed lots of Strange things including NAN for the Days, Mins Hours etc. It also displayed a message saying the local time was invalid, and the date must be in the future - which it was.

Can anyone please help. Much appreciated.

Mark (Helix242):confused:

03-30-2010, 07:51 PM
Link to your site.

03-30-2010, 08:07 PM
Please post a link to the page on your site that contains the problematic script so we can check it out.

03-30-2010, 08:19 PM

Heree is the link.

Many thanks in advance!


I am using Vista Basic

03-30-2010, 10:33 PM
The problem is that your page doesn't seem to be a PHP page, or the page type you've set inside the script when calling it:

var launchdate=new cdLocalTime("cdcontainer", "server-php", 0, "April 23, 2010 15:53:00", "debugmode")

You can either try renaming your page so it ends with .php, or use a different server side language for the script to get the server date/time using, such as SSI. In this case, your page most likely would need to be renamed with the .shtml extension.

03-31-2010, 12:00 AM

Many thanks! I have saved as .shtml and it does work, but the style setting do not seem to be correct. Can you please help. Many thanks


03-31-2010, 08:33 AM
What's wrong with the style? If you're referring to the fact that it doesn't have that "LCD" style like in the DD demo, you'll need to add the following CSS to your page:

<style style="text/css">

.lcdstyle{ /*Example CSS to create LCD countdown look*/
font: bold 18px MS Sans Serif;
padding: 3px;

.lcdstyle sup{ /*Example CSS to create LCD countdown look*/
font-size: 80%


And also, add the following CSS class inside your timer DIV tag:

<div id="cdcontainer" class="lcdstyle"></div>