Go Back   Hardware Forums > Software Support Forums > Web Development

Reply
 
LinkBack Thread Tools
Old 10-06-2007, 08:28 PM   #1 (permalink) Top
iMod

 
Matt555's Avatar
 
Join Date: May 2005
Age: 21 Male
Posts: 3,844
Times Helpful: 238
My Mood: Happy
Status: Offline

My Computer

Default Little Javascript Stopwatch I Made

*EDIT: I'll attach the .html file as the code has problems when pasted for some reason...

Comments and suggestions greatly appreciated

Also here's a version on the net: http://www.trilightdesigns.co.uk/sto...avascript.html

-Matt

Attached Files
File Type: zip stopwatch_in_javascript.html.zip (1.3 KB, 14 views)
__________________

Last edited by Matt555; 11-06-2007 at 02:55 AM.
  Reply With Quote
Whats this? diNovo Edge Bluetooth Wireless Keyboard
diNovo Edge Bluetooth Wireless Keyboard
Seller Price (inc. VAT) Delivery Total Price Availability Seller Rating
Micro Direct £112.27 £4.69 £116.96 In Stock Rated: 3 out of 5 - Number of votes: 40
Dell £122.96 Free £122.96 In Stock Rated: 0 out of 5 - Number of votes: 0
Dell Business £104.65 £8.23 £112.88 In Stock Rated: 0 out of 5 - Number of votes:
Old 10-06-2007, 07:59 PM   #2 (permalink) Top
The King

 
Addis's Avatar
 
Join Date: Jan 2004
Age: 18 Male
Posts: 5,255
Times Helpful: 403
My Mood: Drunk
Status: Offline

My Computer

It doesn't work for me, when I open it in firefox and konqueror nothing happens when I press start.
__________________
Never trust a program you don't have the source code for.

My website | Powerful Desktop Linux | Linux for human beings | Linux for power users | Linux for ricers
Send a message via MSN to Addis   Reply With Quote
Old 10-06-2007, 09:44 PM   #3 (permalink) Top
iMod

 
Matt555's Avatar
 
Join Date: May 2005
Age: 21 Male
Posts: 3,844
Times Helpful: 238
My Mood: Happy
Status: Offline

My Computer

Ahh, yeah, that code I pasted was something I was testing. My bad, I'll edit and put the working code in.
__________________
  Reply With Quote
Old 10-06-2007, 10:26 PM   #4 (permalink) Top
Administrator
 
Sniper's Avatar
 
Join Date: Oct 2001
Age: 24 Male
Posts: 4,420
Times Helpful: 116
My Mood: Bored
Status: Offline

My Computer

working fine here, good work dude!
  Reply With Quote
Old 10-06-2007, 10:28 PM   #5 (permalink) Top
iMod

 
Matt555's Avatar
 
Join Date: May 2005
Age: 21 Male
Posts: 3,844
Times Helpful: 238
My Mood: Happy
Status: Offline

My Computer

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
__________________
  Reply With Quote
Old 11-06-2007, 01:51 AM   #6 (permalink) Top
iMod

 
Matt555's Avatar
 
Join Date: May 2005
Age: 21 Male
Posts: 3,844
Times Helpful: 238
My Mood: Happy
Status: Offline

My Computer

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).
__________________
  Reply With Quote
Old 11-06-2007, 03:03 AM   #7 (permalink) Top
GEEK 2.0
 
blade's Avatar
 
Join Date: Jul 2006
Gender: Male
Posts: 417
Times Helpful: 1
My Mood: Relaxed
Status: Offline

My Computer

Quote:
Originally Posted by Matt555 View Post
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 ; but yea, good job
__________________
Send a message via MSN to blade Send a message via Skype™ to blade   Reply With Quote
Old 11-06-2007, 10:09 AM   #8 (permalink) Top
iMod

 
Matt555's Avatar
 
Join Date: May 2005
Age: 21 Male
Posts: 3,844
Times Helpful: 238
My Mood: Happy
Status: Offline

My Computer

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

PS - I've just validated it to xHTML Strict 1.0 - thought I may as well
__________________
  Reply With Quote
Old 11-06-2007, 01:50 PM   #9 (permalink) Top
iMod

 
Matt555's Avatar
 
Join Date: May 2005
Age: 21 Male
Posts: 3,844
Times Helpful: 238
My Mood: Happy
Status: Offline

My Computer

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

Last edited by Matt555; 11-06-2007 at 03:47 PM.
  Reply With Quote
Old 11-06-2007, 03:43 PM   #10 (permalink) Top
Administrator
 
Sniper's Avatar
 
Join Date: Oct 2001
Age: 24 Male
Posts: 4,420
Times Helpful: 116
My Mood: Bored
Status: Offline

My Computer

latest one looks pretty neat dude!
  Reply With Quote
Old 11-06-2007, 03:46 PM   #11 (permalink) Top
iMod

 
Matt555's Avatar
 
Join Date: May 2005
Age: 21 Male
Posts: 3,844
Times Helpful: 238
My Mood: Happy
Status: Offline

My Computer

Thanks man, I've just done 0.1.2

Code:
0.1.2
- Display 'bug' fixed - now when seconds go from 59 -> 0 it displays as: 59 -> 00 -> 01 instead of 59 -> 0 -> 01
0.1.2
Simple Javascript Stopwatch
.zip File including all code
__________________
  Reply With Quote
Old 12-06-2007, 07:49 AM   #12 (permalink) Top
iMod

 
Matt555's Avatar
 
Join Date: May 2005
Age: 21 Male
Posts: 3,844
Times Helpful: 238
My Mood: Happy
Status: Offline

My Computer

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

Last edited by Matt555; 12-06-2007 at 07:54 AM.
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to identify who made this... None Graphics Design 4 08-04-2007 11:46 AM
Firefox javascript flaw was made up Addis News and Article Comments 7 09-10-2006 08:05 PM
Javascript/FOR loop gumdigger Web Development 1 19-03-2006 11:18 AM
Fresh Javascript Browser Exploit syngod News and Article Comments 0 26-06-2005 10:08 PM
made a few changes Sniper Suggestions and Feedback 6 11-02-2005 09:31 PM


All times are GMT +1. The time now is 01:58 PM.


Copyright © 2000 - 2008 · HARDWAREFORUMS.COM · All rights reserved