Flash Games

 FAQ   Search   Members   Groups   User Control Panel      Login 

It is currently Tue Dec 02, 2008 11:29 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Stop Watch... Need Help!
PostPosted: Sat Nov 17, 2007 10:14 pm 
Offline

Joined: Sat Nov 17, 2007 10:08 pm
Posts: 7
I have a problem with my code and i don't know what's wrong with it...

I got it working before using the time off the computer, But I need it to start from 0 kinda like a stop watch.

Can anyone help me?

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="Generator" CONTENT="TextPad 4.4">
<META NAME="Author" CONTENT="?">
<META NAME="Keywords" CONTENT="?">
<META NAME="Description" CONTENT="?">
<script language="javascript">

function start_clock(){

   var x=new Date()

   var hh=x.getUTCHours()
   var mm=x.getUTCMinutes()
   var ss=x.getUTCSeconds()

if(hh<10){
      hh="0"+hh

   }

    if(mm<10){
         mm="0"+mm

      }

if(ss<10){
      ss="0"+ss

   }


   document.f1.tb1.value = "" + new Date.getUTCHours()
+ ":"+ new Date.getUTCMinutes() + ":" + new Date.getUTCSeconds();





}

function stop_clock(){

   clearTimeout(timer)

}

</script>
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">

<form name="f1">

<input type="text" name="tb1"/>

<input type="button" value="Start" name="start" onClick="start_clock()"/>

<input type="button" value="Stop" name="stop" onClick="stop_clock()"/>

</form>
</BODY>
</HTML>

_________________
"The Justice Is Swift In The Court Of Miracles, I Am The Lawyers And Judge All In One, We Like To Get The Trial Over With Quickly Because It's The Sentence That's Really The Fun!"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User:
Pass:
Log me on automatically each visit: