PDA

View Full Version : Countdown/Countup Timer



DoctorGurge
07-16-2006, 03:35 AM
What I want to write is something that is basically a countdown timer, but then switches to a countup timer, and vice-versa. Basically, here's the rundown: I want it to tell me how long I have left before I have to go to work, and then, when I am at work (or when the counter runs down and shows that I'm supposed to be there), I want it to countdown the hours until I get off work, and then start over counting down the hours until I have to be at work again. On my days off, it would have to contain a "days" field and count down for two days. Seems confusing to me, and sounds very difficult for someone who doesn't know much about JavaScript (for example, me). If you could help, please reply. Thank you very much.

Also, my page that I have written seems to act strange for certain websites. I'm using frames, the one on the left for links and the one on the right to display the page. I'm using the 'target=""' tag, and certain websites, for example Wikipedia, ignore this altogether. I will click on Wiki, and my frame on the left will disappear and Wiki will take over the whole screen. I'm guessing certain websites do this, and it wouldn't be much of a problem, but when I try to back up to my page again, it will pop up for a second and then Wiki will auto-load again. So, basically, I can't back up once I go to that page. Any help on this? Not really JavaScript. Thank you again, and the help is appreciated.

jr_yeo
07-16-2006, 06:03 AM
What I want to write is something that is basically a countdown timer, but then switches to a countup timer, and vice-versa

this link (http://rainbow.arch.scriptmania.com/) may help u in countdown/countup timer :p

DoctorGurge
07-16-2006, 08:00 AM
Yeah, that helps as far as making a clock, but I want it to by a Dynamic countdown/countup timer to be on the homepage...oh, forgot to add about the frames thing that I was looking into trying to throw in a frame across the whole bottom to put this into.

I'm kind of new to the world of JavaScript, so I'm sorry if I sound like a n00b.

DoctorGurge
07-16-2006, 08:27 AM
Doing some research, I see that I'll probably need two countdown timer scripts, or, at least, it will have to countdown twice. However, the variables won't change until my two days off, where it will have to add days into the variable. I'm really confused now at this point. There will need to be one to count down for when I need to go to work and another for when my shift ends. How will I entwine those two to automatically switch from one to the other back to the first again, and then add my two days off as well? Thanks again for the help.

jr_yeo
07-16-2006, 09:32 AM
count down for when I need to go to work and another for when my shift ends
suggestion :p this (http://www.javascriptkit.com/script/script2/alarm.shtml) :D or this (http://www.jracademy.com/~jtucek/java.html)

if its still not "the one", then sorry m much of a help :(