PDA

View Full Version : Help with Countdown Script



helix242
03-30-2010, 06:51 PM
Hi,

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:

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

ddadmin
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.

helix242
03-30-2010, 08:19 PM
Hi,

Heree is the link.

Many thanks in advance!

http://www.darkformproductions.com/index.html

I am using Vista Basic

ddadmin
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.

helix242
03-31-2010, 12:00 AM
Hi,

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

http://www.darkformproductions.com/Contact%20Us.shtml

ddadmin
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*/
background-color:black;
color:lime;
font: bold 18px MS Sans Serif;
padding: 3px;
}

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

</style>

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


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