Perfecting the digital clock Alabama

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

Westglenn Software
205-870-3118
2100 Southbridge Pkwy
Birmingham, AL
Arbitron Inc
205-977-6100
3500 Colonnade Pkwy
Birmingham, AL
eClinicalworks EMR Software
+1-395-685-7896
218 Mount Holly
California, AL
Ihs Inc Software
205-408-1477
4945 Mountain View Pkwy
Birmingham, AL
Visual Solutions Inc
205-930-5540
2217 10th CT S
Birmingham, AL
J K Preg Illustration
(334) 613-9993
2704 Colonial Dr
Montgomery, AL
Priority Software
205-838-7061
9006 4th Ave S
Birmingham, AL
Achaia Solutions
205-437-9960
117 Narrows Creek DR
Birmingham, AL
Exact Software North America
205-980-5270
3000 Eagle Point Corporate DR
Birmingham, AL
J R M Software
205-982-1836
209 Royal Oaks DR
Birmingham, AL

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

Westglenn Software

205-870-3118
2100 Southbridge Pkwy
Birmingham, AL

Regional Articles
- Perfecting the digital clock Alabaster AL
- Perfecting the digital clock Albertville AL
- Perfecting the digital clock Alexander City AL
- Perfecting the digital clock Andalusia AL
- Perfecting the digital clock Anniston AL
- Perfecting the digital clock Arab AL
- Perfecting the digital clock Athens AL
- Perfecting the digital clock Atmore AL
- Perfecting the digital clock Auburn AL
- Perfecting the digital clock Bay Minette AL
- Perfecting the digital clock Bessemer AL
- Perfecting the digital clock Birmingham AL
- Perfecting the digital clock Boaz AL
- Perfecting the digital clock Brewton AL
- Perfecting the digital clock Clanton AL
- Perfecting the digital clock Cullman AL
- Perfecting the digital clock Daphne AL
- Perfecting the digital clock Decatur AL
- Perfecting the digital clock Dothan AL
- Perfecting the digital clock Enterprise AL
- Perfecting the digital clock Eufaula AL
- Perfecting the digital clock Fairhope AL
- Perfecting the digital clock Florence AL
- Perfecting the digital clock Foley AL
- Perfecting the digital clock Fort Payne AL
- Perfecting the digital clock Gadsden AL
- Perfecting the digital clock Guntersville AL
- Perfecting the digital clock Haleyville AL
- Perfecting the digital clock Hartselle AL
- Perfecting the digital clock Huntsville AL
- Perfecting the digital clock Jasper AL
- Perfecting the digital clock Madison AL
- Perfecting the digital clock Mobile AL
- Perfecting the digital clock Montevallo AL
- Perfecting the digital clock Montgomery AL
- Perfecting the digital clock Muscle Shoals AL
- Perfecting the digital clock Northport AL
- Perfecting the digital clock Opelika AL
- Perfecting the digital clock Pelham AL
- Perfecting the digital clock Pell City AL
- Perfecting the digital clock Phenix City AL
- Perfecting the digital clock Pinson AL
- Perfecting the digital clock Prattville AL
- Perfecting the digital clock Scottsboro AL
- Perfecting the digital clock Selma AL
- Perfecting the digital clock Semmes AL
- Perfecting the digital clock Sylacauga AL
- Perfecting the digital clock Talladega AL
- Perfecting the digital clock Theodore AL
- Perfecting the digital clock Trussville AL
- Perfecting the digital clock Tuscaloosa AL
- Perfecting the digital clock Tuscumbia AL
- Perfecting the digital clock Valley AL
- Perfecting the digital clock Wetumpka AL
Related Local Events
December 2009 Gulf Coast Technology Council Meeting
Dates: 12/16/2009 - 12/16/2009
Location: ITT Technical Institute
Mobile, AL
View Details

Going Green Awards
Dates: 10/1/2009 - 10/1/2009
Location: Sheraton
North Birmingham, AL
View Details

Java Jam
Dates: 9/10/2009 - 9/10/2009
Location: Hartselle Chamber of Commerce
Hartselle, AL
View Details

Farmers Telecommunications Cooperative:55th Annual Meeting
Dates: 8/1/2009 - 8/1/2009
Location: DeKalb County Schools Coliseum
Rainsville, AL
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