Perfecting the digital clock Minnesota

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

Twin Cities Solutions, Inc.
952.881.6570
10800 Lyndale Ave S
Bloomington, MN
American Software and Global Technologies
(952) 885-5640
1650 W 82nd St
Minneapolis, MN
Lawson Software
651-767-7000
380 Saint Peter St
St. Paul, MN
Assessment Systems
651-647-9220
2233 University Ave W
St. Paul, MN
Automation Station Inc
651-224-1985
180 5th St E
St. Paul, MN
3 Sixty Software, LLC
612-961-0787
4209 Heathcote Rd
Wayzata, MN
Global Software
(612) 305-4472
10 S 5th St
Minneapolis, MN
Genuine Genuis Solutions
(612) 872-4256
431 Clifton Ave
Minneapolis, MN
Notion IT
(507) 276-9149
820 Sunrise Dr.
New Ulm, MN
Productive Corporation
612.375.0204
510 First Ave North Suite 310
Minneapolis, MN

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

Twin Cities Solutions, Inc.

Twin Cities Solutions, Inc. is a privately owned information technology solutions firm primarily engaged in providing technical an

952.881.6570
10800 Lyndale Ave S
Bloomington, MN
http://www.twincs.com

Twin Cities Solutions, Inc. is a privately owned information technology solutions firm primarily engaged in providing technical and project management expertise to application development initiatives.

We are experienced in providing information technology solutions to government agencies as well as manufacturing, legal, financial and publishing business sectors.

Our team of consultants provides expertise to our clients in several key areas: E-Commerce applications, distributed applications, database development and desktop support.

Regional Articles
- Perfecting the digital clock Albert Lea MN
- Perfecting the digital clock Andover MN
- Perfecting the digital clock Anoka MN
- Perfecting the digital clock Bemidji MN
- Perfecting the digital clock Brainerd MN
- Perfecting the digital clock Burnsville MN
- Perfecting the digital clock Champlin MN
- Perfecting the digital clock Chanhassen MN
- Perfecting the digital clock Chaska MN
- Perfecting the digital clock Circle Pines MN
- Perfecting the digital clock Cloquet MN
- Perfecting the digital clock Cottage Grove MN
- Perfecting the digital clock Detroit Lakes MN
- Perfecting the digital clock Duluth MN
- Perfecting the digital clock Eden Prairie MN
- Perfecting the digital clock Elk River MN
- Perfecting the digital clock Excelsior MN
- Perfecting the digital clock Faribault MN
- Perfecting the digital clock Fergus Falls MN
- Perfecting the digital clock Forest Lake MN
- Perfecting the digital clock Hastings MN
- Perfecting the digital clock Hibbing MN
- Perfecting the digital clock Hopkins MN
- Perfecting the digital clock Inver Grove Heights MN
- Perfecting the digital clock Lakeville MN
- Perfecting the digital clock Mankato MN
- Perfecting the digital clock Minneapolis MN
- Perfecting the digital clock Minnetonka MN
- Perfecting the digital clock Moorhead MN
- Perfecting the digital clock Mound MN
- Perfecting the digital clock New Ulm MN
- Perfecting the digital clock Osseo MN
- Perfecting the digital clock Owatonna MN
- Perfecting the digital clock Prior Lake MN
- Perfecting the digital clock Red Wing MN
- Perfecting the digital clock Rochester MN
- Perfecting the digital clock Rosemount MN
- Perfecting the digital clock Saint Cloud MN
- Perfecting the digital clock Saint Paul MN
- Perfecting the digital clock Savage MN
- Perfecting the digital clock Shakopee MN
- Perfecting the digital clock South Saint Paul MN
- Perfecting the digital clock Stillwater MN
- Perfecting the digital clock Wayzata MN
- Perfecting the digital clock Willmar MN
- Perfecting the digital clock Winona MN

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