473,396 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Countdown script not working

I am using the countdown script developed by Chris Nott on his
website(http://www.dithered.com/javascript/c.../example.html).

The script counts down the days, hours, minutes and seconds to a specified
date. His site at the link above provides the source code .js file, as well
as instructions for how to install and configure the script on your page.
I've followed them explicitly, yet it won't work, and I was hoping someone
might be able to take a look and help me out.

Here's the URL where I'm using the script:
http://www.lebois.com/wedding/home.html

TIA for any help provided!

---

Sincerely,

Matt
ma**@lebois.com
Jul 20 '05 #1
5 3251

"Matt Stanley" <ma**@lebois.com> schreef in bericht
news:vj************@corp.supernews.com...
I am using the countdown script developed by Chris Nott on his
website(http://www.dithered.com/javascript/c.../example.html).

The script counts down the days, hours, minutes and seconds to a specified
date. His site at the link above provides the source code .js file, as well as instructions for how to install and configure the script on your page.
I've followed them explicitly, yet it won't work, and I was hoping someone
might be able to take a look and help me out.

Here's the URL where I'm using the script:
http://www.lebois.com/wedding/home.html


A couple of errors showed up in a glance:

* You didn't generate all of the required images (Only 0.gif as far as I can
see)
* You didn't close the script tag that includes countdown.js with </script>
* You are using a date from the past

BTW, congratulations to the couple :-)
JW

Jul 20 '05 #2
JW,

Thanks for your help! That seems to have fixed it in IE/NS 6. IE 5.5 seems
to be having a problem with it but that may be my PC. Will reboot and check
again. If it still has a problem, where can I get my hands on a .js file
that will redirect the visitor to an alternate URL if they're using IE 5.5?

"Janwillem Borleffs" <jw*@jwbfoto.demon.nl> wrote in message
news:3f***********************@news.euronet.nl...

"Matt Stanley" <ma**@lebois.com> schreef in bericht
news:vj************@corp.supernews.com...
I am using the countdown script developed by Chris Nott on his
website(http://www.dithered.com/javascript/c.../example.html).

The script counts down the days, hours, minutes and seconds to a specified date. His site at the link above provides the source code .js file, as well
as instructions for how to install and configure the script on your page. I've followed them explicitly, yet it won't work, and I was hoping someone might be able to take a look and help me out.

Here's the URL where I'm using the script:
http://www.lebois.com/wedding/home.html


A couple of errors showed up in a glance:

* You didn't generate all of the required images (Only 0.gif as far as I

can see)
* You didn't close the script tag that includes countdown.js with </script> * You are using a date from the past

BTW, congratulations to the couple :-)
JW

Jul 20 '05 #3

"Matt Stanley" <ma**@lebois.com> schreef in bericht
news:vj************@corp.supernews.com...
JW,

Thanks for your help! That seems to have fixed it in IE/NS 6. IE 5.5 seems
to be having a problem with it but that may be my PC. Will reboot and check again. If it still has a problem, where can I get my hands on a .js file
that will redirect the visitor to an alternate URL if they're using IE 5.5?


The script is pretty starightforward, so an alternative URL for IE5.5 will
be somewhat of an overkill.

Just see what happens after the reboot and report the errors you get.
JW

Jul 20 '05 #4
JRS: In article <vj************@corp.supernews.com>, seen in
news:comp.lang.javascript, Matt Stanley <ma**@lebois.com> posted at Sat,
16 Aug 2003 18:30:55 :-
I am using the countdown script developed by Chris Nott on his
website(http://www.dithered.com/javascript/c.../example.html).


The script is not all it could be.

It makes no adjustment for Summer Time, so that at present, 22:39:+, it
says ... 02 hours 20 minutes ... away.

It has
var days = parseInt(difference / 86400000) + '';
where
var days = Math.floor(difference / 86400000) + '';
is more direct and faster.

It has a fixed timeout of nominally 1000 ms, so that, because of delays,
it does not show every second (it misses about 1 in 20 in Win98, perhaps
1 in 100 in WinNT+).

The graphics are indexed by the result of parseInt on a character, where
they could be indexed by the character, or by +character.

Date fields are handled as strings; numbers seem simpler and probably
faster.

BTW, the following gives me a date-time difference in days, hh:mm:ss :

Diff = new Date(2010, 11, 25) - new Date()
X = Math.floor(Diff/864e5) + ' days, ' +
new Date(Diff%864e5).toString().match(/\S{8}/)

but I've not checked its efficiency. It will fail anywhere that
toString() does not give 24-h hh:mm:ss .

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.
Jul 20 '05 #5
Thanks for the help John,

I adopted your advice... always appreciate any input on how to improve my
scripts and/or make them more efficient.

Matt

"Dr John Stockton" <sp**@merlyn.demon.co.uk> wrote in message
news:lI**************@merlyn.demon.co.uk...
JRS: In article <vj************@corp.supernews.com>, seen in
news:comp.lang.javascript, Matt Stanley <ma**@lebois.com> posted at Sat,
16 Aug 2003 18:30:55 :-
I am using the countdown script developed by Chris Nott on his
website(http://www.dithered.com/javascript/c.../example.html).
The script is not all it could be.

It makes no adjustment for Summer Time, so that at present, 22:39:+, it
says ... 02 hours 20 minutes ... away.

It has
var days = parseInt(difference / 86400000) + '';
where
var days = Math.floor(difference / 86400000) + '';
is more direct and faster.

It has a fixed timeout of nominally 1000 ms, so that, because of delays,
it does not show every second (it misses about 1 in 20 in Win98, perhaps
1 in 100 in WinNT+).

The graphics are indexed by the result of parseInt on a character, where
they could be indexed by the character, or by +character.

Date fields are handled as strings; numbers seem simpler and probably
faster.

BTW, the following gives me a date-time difference in days, hh:mm:ss :

Diff = new Date(2010, 11, 25) - new Date()
X = Math.floor(Diff/864e5) + ' days, ' +
new Date(Diff%864e5).toString().match(/\S{8}/)

but I've not checked its efficiency. It will fail anywhere that
toString() does not give 24-h hh:mm:ss .

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE

4 © <URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript <URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources. <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics,

links.
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bonnett | last post by:
I have been creating a generic countdown timer (source code below), counting the seconds, minutes, hours and days till an event, but I have having trouble with it finding out how many hours are...
3
by: Joseph S | last post by:
I am having problems with the following countdown script. For some reason, the number of months is occasionally wrong. I can't quite put my finger on the problem. Any assistance or...
6
by: Michael | last post by:
I would like to display the time counting down on a webpage when I use this script.... Is it possible? <script language="JavaScript"> <!-- var tID = 0; var startTime = null; var...
4
by: Christine | last post by:
I've implemented a countdown timer for a tutorial web page that should give the user 45 minutes to complete the test, only to find that the timer is slowly 'losing' time. On average, it actually...
8
by: Michael | last post by:
I have this script that works the way I want except for one thing... Once it hits zero it starts to count up and looks like this: -1:0-1:0-1:0-18 with the last number counting up. Can anyone...
4
by: henrik | last post by:
Hi. Can anyone tell me the python code for a simple countdown from eg. 2.00 minutes. It should be printet out to the screen. When it is finished it should write "Time is up" Hope you can...
1
by: DennyLoi | last post by:
Hi everyone. I am trying to implement a countdown timer which is displayed on my page. The counter needs to countdown from 10 seconds to 0 upon the page loading up. I tried the following, but...
0
by: Jorhajnes | last post by:
Hi there. Im very new to making games in flash, although I have used flash for quite some time now in web-based situations so I know my way around. Anyways, I thought it would be fun to try...
5
mageswar005
by: mageswar005 | last post by:
hi, I need a javascript countdown timer to my website, I have already the countdown timer but its have some problem. Note: 1) If i choose the tools/internet option in my browser means , at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.