Affiliate Programs
 
Search affiliate programs for: 
Affiliate Categories
» Affiliate Networks
» Ad Networks
» 2 Tier Programs
» Pay Per Sale
» Pay Per Lead
» Residual Income
» Datafeeds
» Multi Tier Programs
» Business Opps
» Other Programs

Newsletter
Get newly added affiliate programs by email. Enter your email here:
Article Categories
» Affiliate Marketing
» Business
» Ecommerce
» Hosting
» Marketing
» Sales
» Web Designing
» Webmasters
» SEO & Promotion
» Working At Home
» Other Articles
» Affiliate Glossary


Go Back   AffiliateSeeking Forum > Website Creation, Design & Maintenance > Programming > JavaScript

JavaScript Discuss about JavaScript problems you are having or help others with their JavaScript issues.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-22-2011, 06:35 AM
decent decent is offline
Member
 
Join Date: May 2011
Location: I love Pakistan!
Posts: 44
decent is on a distinguished road
Default Help please!

Hello friends,
I want to add a stopwatch to my website but I don't have any idea.
Any free and best JavaScript? Please share, I am waiting for your reply...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 08-11-2011, 09:43 AM
menlawre menlawre is offline
Member
 
Join Date: Aug 2011
Posts: 30
menlawre is on a distinguished road
By stopwatch you mean count down or count up? Explain a bit more what you want to achieve and then I can help you further.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 08-11-2011, 11:27 AM
serena85 serena85 is offline
Banned
 
Join Date: Apr 2011
Posts: 447
serena85 is on a distinguished road
There must be some scripts that you can use just try and search Google.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 02-28-2012, 01:54 PM
Tom_141 Tom_141 is offline
Senior Member
 
Join Date: Feb 2012
Location: INDIA
Posts: 598
Tom_141 is on a distinguished road
first learn javascript dear and then go for search about the script this way you may learn and understand the concepts too
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 02-28-2012, 02:32 PM
conanalcimedes conanalcimedes is offline
Senior Member
 
Join Date: Apr 2010
Posts: 1,271
conanalcimedes is on a distinguished road
I think you can search on this in the internet. Hope you can find it.
__________________
Car Store | New Cars
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 02-29-2012, 08:16 AM
Tessaalfred Tessaalfred is offline
Senior Member
 
Join Date: Jan 2012
Posts: 301
Tessaalfred is on a distinguished road
You can find the exact code for stopwatch in java script at http://www.javascriptsearch.com/scri...stopwatch.html
__________________
E Commerce Portland| Portland Web Design| Portland Website Design
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 08-04-2012, 10:25 PM
chris_b chris_b is offline
Junior Member
 
Join Date: Aug 2012
Posts: 11
chris_b is on a distinguished road
<script LANGUAGE="JavaScript">

var timerRunning = false

var timerID = null

// create instance of Date object representing current time

var initial = new Date()

// start timer

function start_watch() {

// set the button's label to "stop"

document.forms['watch'].general.value = "stop"

// assign the stop function reference to the button's onClick event handler

document.forms['watch'].general.onclick = stop

// ask the user if to reset the timer

if (confirm("Would you like to reset the timer?"))

// set global variable to new time

initial = new Date()

// assign milliseconds since 1970 to global variable

startTime = initial.getTime()

// make sure the timer is stopped

stopTimer()

// run and display timer

showTimer()

}

// set button to initial settings

function stop() {

// set the button's label to "start"

document.forms['watch'].general.value = "start"

// assign the start_watch function reference to the button's onClick event handler

document.forms['watch'].general.onclick = start_watch

// stop timer

stopTimer()

}

// stop timer

function stopTimer() {

// if the timer is currently running

if (timerRunning)

// clear the current timeout (stop the timer)

clearTimeout(timerID)

// assign false to global variable because timer is not running

timerRunning = false

}

function showTimer() {

// create instance of Date representing current timer

var current = new Date()

// assign milliseconds since 1970 to local variable

var curTime = current.getTime()

// assign difference in milliseconds since timer was cleared

var dif = curTime - startTime

// assign difference in seconds to local variable

var result = dif / 1000

// is result is not positive

if (result < 1)

// attach an initial "0" to beginning

result = "0" + result

// convert result to string

result = result.toString()

// if result is integer

if (result.indexOf(".") == -1)

// attach ".00" to end

result += ".00"

// is result contains only one digit after decimal point

if (result.length - result.indexOf(".") <= 2)

// add a second digit after point

result += "0"

// place result in text field

document.forms['watch'].display.value = result

// call function recursively immediately (must use setTimeout to avoid overflow)

timerID = setTimeout("showTimer()", 0)

// timer is currently running

timerRunning = true

}

</script>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +1. The time now is 10:21 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0
© 2004-2011 AffiliateSeeking. All rights reserved.