Click to See Complete Forum and Search --> : countdown timer


rosends
04-08-2003, 03:52 PM
I've taken the countdown timer script from here and inserted it (correctly?) on my page.
The timer appears, but no values (numbers) go into the spaces.
I hope it isn't too much to ask -- but could someone look at the source for the page listed below and let me know what bonehead move I made that has the numbers not load?

Thanks

The page is the right frame of
www,mydiningroom.com

or just www.mydiningroom.com/mydiningroom.html

thanks
Dan

Jona
04-08-2003, 04:15 PM
Your zeros are coming before your c's. The properties of the images are: 0c.gif instead of c0.gif. That's the only error I see.

rosends
04-08-2003, 04:30 PM
Still nothing. But I did notice that I set both now AND later to "new Date" then subtract the two. How can that be right, the answer would be 0.

Still looking for whatever help I can get.
Dan

Jona
04-08-2003, 04:34 PM
I just checked, and neither c0.gif nor 0c.gif exist on your server. The images have to exist to be shown. :p

rosends
04-08-2003, 04:42 PM
getting there, (i obviously missed one gif...) but the math is still worng.
thanks for the help
Dan

Jona
04-08-2003, 04:48 PM
BIG ERROR

Your variables are messed up. You have c1 = new Image(); 1c = "1c.gif"; That is wrong. You have to use c1.src = "1c.gif"; not 1c. Variables cannot start with numbers.

rosends
04-08-2003, 07:25 PM
I changed the image things to c# (I cut and pasted this from the javascript source) but the numbers still aren't there. The source for the initial code page is the same (in the new date and Now variables) but I'm not keen enough to spot the error...
Sorry to be such a drag.
thanks
Dan

Jona
04-08-2003, 07:34 PM
Do the images exist? Make sure they're on your server, and the .src's are pointing to the right location.

rosends
04-08-2003, 07:47 PM
I checked the images -- the are all there. Is it possible that the onload which gets the current time is in the wrong place? I have it in my {body} part which is in the head section, but the example page hjas the BODY tage after the /head...

thanks

http://javascript.internet.com/clocks/digital-countdown.html

Dan


BING! I moved the gettime call to the <BODY> tag line (I misread and put it in my body{bgetc} section. Voila!
THANK YOU!
Dan