Little Javascript Stopwatch I Made

It doesn't work for me, when I open it in firefox and konqueror nothing happens when I press start.
 
Ahh, yeah, that code I pasted was something I was testing. My bad, I'll edit and put the working code in.
 
Thanks man :)

I decided to scrap pasting the code into the post as it didn't like that for some reason :S

I think I'm going to work on a timeDifference() function to give the times in between laps :)
 
Also - if anyone has any suggestions on extra features for the stopwatch let me know :)

I'd like to add some more features, make it a bit more useful (even though it's still just a silly little app I made when bored).
 
Also - if anyone has any suggestions on extra features for the stopwatch let me know :)

I'd like to add some more features, make it a bit more useful (even though it's still just a silly little app I made when bored).

i wish i can make stuff like that with ease when im bored :P; but yea, good job
 
Hehe thanks - once the basics were done adding simple little things to fix bugs was fun - like disabling the buttons, that stopped problems that people had when the clicked buttons when they weren't needed :P

PS - I've just validated it to xHTML Strict 1.0 - thought I may as well :)
 
Just finished a new version: It now stores the lap times in an array as opposed to just displaying them on screen :)

Code:
Version history:

0.0.1 [10th June 2007]
- Stopwatch created with start and stop functions,

0.0.2 [10th June 2007]
- Lap and reset functions added,

0.0.3 [10th June 2007]
- Un-needed buttons disabled,

0.1.0 [11th June 2007]
- Stopwatch stlyed using CSS,
- Page validated to xHTML Strict 1.0,
- Javascript code placed into separate file,

0.1.1 [11th June 2007]
- Lap time results placed into an array as opposed to simply displayed on page,
- The array should allow for some manipulation,

Simple Javascript Stopwatch
.zip File including all code

If anyone has any suggestions on version number please let me know - it's something I've never quite understood...
 
Code:
0.1.3
- Time difference between laps added,

0.1.3
Simple Javascript Stopwatch
.zip File including all code

I'm having a few accuracy issues with the time difference - I'm going to try and recode that at somepoint - currently it uses a separate timer:

You press the lap button for the first time and it starts the timer, when you press it again, it stops the timer, grabs the results, takes 00:00:00:1 off (as it had a problem with adding it one for some reason) and puts them into variables to display on screen - it then resets the 2nd timer to 00:00:00:0 and starts this second timer again, waiting for the lap button to be pressed again.

I think I've found a problem - I can't remember if I set the pause button to pause the 2nd timer and the reset button to reset the 2nd timer...
 
Back
Top