Perfecting the digital clock South Carolina

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

Charlotte Web Design & Development
(704) 577-8242
Commodore point rd
Lake Wylie, SC
Pinnacle Consulting LLC
803 629 5243
98 Groves Wood Ct
Columbia, SC
Coastal Technology Group/CTG Consulting
(704) 609-4091
4522 Firethorne Drive
Murrells Inlet, SC
Precision Business Technologies Inc
(843) 235-2907
70 Dagullah Way
Pawleys Island, SC
Strategic Technologies
(864) 281-0682
481 Garlington Rd
Greenville, SC
Technology Resources For Effective Environments
(864) 223-0640
Greenwood, SC
C-1 Tech
(843) 645-4220
124 Boardwalk Dr
Okatie, SC
Progressive Systems
(864) 941-8970
1612 Rivers St
Greenwood, SC
Woodside & Associates
(803) 790-1717
25 Cedarwood Ln
Columbia, SC
Metalogix
(803) 548-9390
1061 521 Corporate Ctr Dr Ste 155
Fort Mill, SC

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

Charlotte Web Design & Development

7045778242
Commodore point rd
Lake Wylie, SC
http://www.charlottewebdevelopment.com

Regional Articles
- Perfecting the digital clock Aiken SC
- Perfecting the digital clock Anderson SC
- Perfecting the digital clock Beaufort SC
- Perfecting the digital clock Bennettsville SC
- Perfecting the digital clock Bluffton SC
- Perfecting the digital clock Boiling Springs SC
- Perfecting the digital clock Charleston SC
- Perfecting the digital clock Clemson SC
- Perfecting the digital clock Clover SC
- Perfecting the digital clock Columbia SC
- Perfecting the digital clock Conway SC
- Perfecting the digital clock Darlington SC
- Perfecting the digital clock Dillon SC
- Perfecting the digital clock Easley SC
- Perfecting the digital clock Florence SC
- Perfecting the digital clock Fort Mill SC
- Perfecting the digital clock Fountain Inn SC
- Perfecting the digital clock Gaffney SC
- Perfecting the digital clock Gaston SC
- Perfecting the digital clock Georgetown SC
- Perfecting the digital clock Goose Creek SC
- Perfecting the digital clock Greenville SC
- Perfecting the digital clock Greenwood SC
- Perfecting the digital clock Greer SC
- Perfecting the digital clock Hartsville SC
- Perfecting the digital clock Hilton Head Island SC
- Perfecting the digital clock Inman SC
- Perfecting the digital clock Irmo SC
- Perfecting the digital clock Ladson SC
- Perfecting the digital clock Lancaster SC
- Perfecting the digital clock Laurens SC
- Perfecting the digital clock Lexington SC
- Perfecting the digital clock Manning SC
- Perfecting the digital clock Moncks Corner SC
- Perfecting the digital clock Mount Pleasant SC
- Perfecting the digital clock Murrells Inlet SC
- Perfecting the digital clock Myrtle Beach SC
- Perfecting the digital clock Newberry SC
- Perfecting the digital clock North Augusta SC
- Perfecting the digital clock North Charleston SC
- Perfecting the digital clock Orangeburg SC
- Perfecting the digital clock Pickens SC
- Perfecting the digital clock Piedmont SC
- Perfecting the digital clock Rock Hill SC
- Perfecting the digital clock Seneca SC
- Perfecting the digital clock Simpsonville SC
- Perfecting the digital clock Spartanburg SC
- Perfecting the digital clock Summerville SC
- Perfecting the digital clock Sumter SC
- Perfecting the digital clock Taylors SC
- Perfecting the digital clock Travelers Rest SC
- Perfecting the digital clock Walterboro SC
- Perfecting the digital clock West Columbia SC
Related Local Event
Information Technology Council
Dates: 11/10/2009 - 11/10/2009
Location: Greater Columbia Chamber of Commerce
Columbia, SC
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