Perfecting the digital clock Tennessee

We're in the home stretch with the digital clock script. All we need to do now is set the minutes and seconds.

Local Companies

Advanced Technical Services
615-747-5810
200 Hill Ave
Nashville, TN
Computer Services
615-252-8044
230 Willow St
Nashville, TN
Expeditors International
(901) 362-9771
5395 Distriplex Farms Drive
Memphis, TN
Simple Solutions
(901) 289-0089
4499 Seven Valley Cove
Memphis, TN
Advanced Network Solutions
615-277-0500
105 Broadway
Nashville, TN
Cyberangel Security Solutions Inc
615-837-9191
475 Metroplex DR
Nashville, TN
Peachtree Software Support
615-256-1111
415 4th Ave S
Nashville, TN
C M S Manufacturing Systems
615-662-3102
131 Belle Forest Cir
Nashville, TN
Cbnc LLC
615-831-3270
5360 Edmondson Pike
Nashville, TN
Logical Systems, Inc
(901) 377-5574
7950 Stage Hills Boulevard
Bartlett,, TN

provided by: 
Originally published at Internet.com


Tips... We're in the home stretch. We've grabbed the time, set the returns into numbers we can play with and used those numbers to post the AM/PM image and the two hour images. Now we'll set the minutes and seconds.

Here's the code

Here's the code we're interested in:

if(min < 10) { document["tensMin"].src=d[0].src; } if(min > 9) { document["tensMin"].src=d[parseInt(min/10,10)].src; } document["Min"].src=d[min%10].src; if(sec < 10) { document["tensSec"].src=d[0].src; } if(sec > 9) { document["tensSec"].src=d[parseInt(sec/10,10)].src; } document["Sec"].src=d[sec%10].src; document["amPM"].src=amPM; setTimeout("clock();",100);

The script plays with the minutes and seconds in the same way it did the hours, through "if" statements.

If the minute return is less than "tensMIN" (the first minute image), it is set to d0.src. If you look back up the script, you'll see that is the dgt0.gif.

If the minute is more than nine, then we need to get the correct 10 number in the "tensMin" position. We already know that the minute return is 10 or above so we need either 1, 2, 3, 4, or 5. The little math equation parseInt(min/10,10) does the trick...

Read article at Internet.com site

Featured Local Company

Advanced Technical Services

615-747-5810
200 Hill Ave
Nashville, TN

Regional Articles
- Perfecting the digital clock Antioch TN
- Perfecting the digital clock Ashland City TN
- Perfecting the digital clock Brentwood TN
- Perfecting the digital clock Bristol TN
- Perfecting the digital clock Chattanooga TN
- Perfecting the digital clock Clarksville TN
- Perfecting the digital clock Cleveland TN
- Perfecting the digital clock Collierville TN
- Perfecting the digital clock Columbia TN
- Perfecting the digital clock Cookeville TN
- Perfecting the digital clock Cordova TN
- Perfecting the digital clock Crossville TN
- Perfecting the digital clock Dickson TN
- Perfecting the digital clock Dyersburg TN
- Perfecting the digital clock Elizabethton TN
- Perfecting the digital clock Franklin TN
- Perfecting the digital clock Gallatin TN
- Perfecting the digital clock Germantown TN
- Perfecting the digital clock Goodlettsville TN
- Perfecting the digital clock Greeneville TN
- Perfecting the digital clock Harriman TN
- Perfecting the digital clock Hendersonville TN
- Perfecting the digital clock Hermitage TN
- Perfecting the digital clock Hixson TN
- Perfecting the digital clock Humboldt TN
- Perfecting the digital clock Jackson TN
- Perfecting the digital clock Johnson City TN
- Perfecting the digital clock Jonesborough TN
- Perfecting the digital clock Kingsport TN
- Perfecting the digital clock Knoxville TN
- Perfecting the digital clock La Follette TN
- Perfecting the digital clock La Vergne TN
- Perfecting the digital clock Lebanon TN
- Perfecting the digital clock Lenoir City TN
- Perfecting the digital clock Loudon TN
- Perfecting the digital clock Madison TN
- Perfecting the digital clock Martin TN
- Perfecting the digital clock Maryville TN
- Perfecting the digital clock Mc Minnville TN
- Perfecting the digital clock Memphis TN
- Perfecting the digital clock Millington TN
- Perfecting the digital clock Morristown TN
- Perfecting the digital clock Mount Juliet TN
- Perfecting the digital clock Murfreesboro TN
- Perfecting the digital clock Nashville TN
- Perfecting the digital clock Oak Ridge TN
- Perfecting the digital clock Old Hickory TN
- Perfecting the digital clock Ooltewah TN
- Perfecting the digital clock Ripley TN
- Perfecting the digital clock Rogersville TN
- Perfecting the digital clock Sevierville TN
- Perfecting the digital clock Shelbyville TN
- Perfecting the digital clock Signal Mountain TN
- Perfecting the digital clock Smyrna TN
- Perfecting the digital clock Soddy Daisy TN
- Perfecting the digital clock Tullahoma TN
Related Articles
- Image Proportion Script Tennessee
Enter height and width of an image to resize. Then enter a new height; the script figures the new width, keeping the same proportions the image original had.
- The zones of the time zone clock Tennessee
- So, You Want to Layer, Huh? Part II Tennessee
- Working with a Timer in C# Tennessee
- More work on the digital clock code! Tennessee
- Create the Clock Tennessee
- Get It To The Text Box Tennessee
Related Local Events
Christians In Action Trade Show
Dates: 10/16/2009 - 10/17/2009
Location: Gaylord Opryland Resort & Convention Center
Nashville, TN
View Details

MS PowerPoint 2002 (XP) Level Two
Dates: 7/16/2009 - 7/16/2009
Location: Greater Nashville Association of Realtors
Nashville, TN
View Details

Intergraph 2009
Dates: 6/15/2009 - 6/18/2009
Location: Gaylord Opryland Resort & Convention Center
Nashville, TN
View Details

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML