Connecting Tech Pros Worldwide Help | Site Map

Any one Have coding of Reverse stop watch?

Newbie
 
Join Date: Oct 2009
Posts: 9
#1: Oct 8 '09
Any one Have coding of Reverse stop watch?
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,148
#2: Oct 8 '09

re: Any one Have coding of Reverse stop watch?


What is that? You mean like a count down?
Newbie
 
Join Date: Oct 2009
Posts: 9
#3: Oct 9 '09

re: Any one Have coding of Reverse stop watch?


Send me Code to create Reverse stop watch in java script...
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#4: Oct 9 '09

re: Any one Have coding of Reverse stop watch?


double posting is against our forum rules (you should really read them). If you need to bring up your previous post then make a reply there.

and we’re not giving out code (this is a place to learn).

MODERATOR
Newbie
 
Join Date: Oct 2009
Posts: 9
#5: Oct 10 '09

re: Any one Have coding of Reverse stop watch?


How to Get Value from loop?To Start the Timer
With JavaScript
Newbie
 
Join Date: Oct 2009
Posts: 9
#6: Oct 11 '09

re: Any one Have coding of Reverse stop watch?


I have Done this but its not working Properly....
Expand|Select|Wrap|Line Numbers
  1. <input type="text" id="i" name="i">
  2. <script type="text/javascript">
  3.  
  4. var image=new Array("1","2","3","4","5","6");
  5. function change()
  6. {
  7.     for(index=5;index<=image.length;index--)
  8.     {
  9.         document.all("i").value=image[index];
  10.          setInterval("change()",1000);
  11.     }
  12. }
ssnaik84's Avatar
Member
 
Join Date: Aug 2009
Location: Bengaluru, India
Posts: 119
#7: Oct 11 '09

re: Any one Have coding of Reverse stop watch?


what u want to do exactly?

Quote:
Expand|Select|Wrap|Line Numbers
  1. for(index=5;index<=image.length;index--)
problem is here..
image.length is 5 , and you are decreasing index value..

it will go into infinite loop..
gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,126
#8: Oct 12 '09

re: Any one Have coding of Reverse stop watch?


could you show the code you have and explain your problem a bit more clearly?

kind regards
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,148
#9: Oct 12 '09

re: Any one Have coding of Reverse stop watch?


You are also starting a new countdown timer every iteration through your loop
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#10: Oct 13 '09

re: Any one Have coding of Reverse stop watch?


Keep setInterval outside the function and use document.getElementById() in place of document.all.
Newbie
 
Join Date: Oct 2009
Posts: 9
#11: Oct 16 '09

re: Any one Have coding of Reverse stop watch?


Quote:

Originally Posted by Plater View Post

What is that? You mean like a count down?

Yeah Countdown I've created By loop AlSo but its not working properly Help me if U can..
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#12: Oct 16 '09

re: Any one Have coding of Reverse stop watch?


what code do you have so far (including the latest updates)?
Reply


Similar JavaScript / Ajax / DHTML bytes