Perfecting the digital clock North 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

The Lead Tree
321-206-8283
306 North Rankin Street
Atkinson, NC
StreamLogic Inc.
704-771-1090
3030 Glen Summit Dr.
Charlotte, NC
D P Solutions Inc
336-854-7700
4411 W Market St
Greensboro, NC
Software Design Inc
336-378-0900
1301 Carolina St
Greensboro, NC
Advantec Information Systems LLC
336-275-2832
2007 Yanceyville St
Greensboro, NC
Community Web
336-499-3001
133 Hicks St
Winston-Salem, NC
BuildLinks: Web-based Project Management for Home Builders
888-700-9470
3800 Paramount Parkway, Suite 100
Morrisville, NC
Collabera
(704) 372-7272
212 South Tryon Street
Charlotte, NC
CompuData, Inc
(704) 504-0600
2401 Whitehall Park Drive
Charlotte, NC
Dalcom Consulting
336-851-1802
8 Oak Branch DR
Greensboro, NC

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

The Lead Tree

321-206-8283
306 North Rankin Street
Atkinson, NC

Related Articles
Regional Articles
- Perfecting the digital clock Albemarle NC
- Perfecting the digital clock Apex NC
- Perfecting the digital clock Arden NC
- Perfecting the digital clock Asheboro NC
- Perfecting the digital clock Asheville NC
- Perfecting the digital clock Bessemer City NC
- Perfecting the digital clock Boone NC
- Perfecting the digital clock Brevard NC
- Perfecting the digital clock Burlington NC
- Perfecting the digital clock Camp Lejeune NC
- Perfecting the digital clock Candler NC
- Perfecting the digital clock Cary NC
- Perfecting the digital clock Chapel Hill NC
- Perfecting the digital clock Charlotte NC
- Perfecting the digital clock Clayton NC
- Perfecting the digital clock Clemmons NC
- Perfecting the digital clock Clinton NC
- Perfecting the digital clock Concord NC
- Perfecting the digital clock Conover NC
- Perfecting the digital clock Dunn NC
- Perfecting the digital clock Durham NC
- Perfecting the digital clock Eden NC
- Perfecting the digital clock Elizabeth City NC
- Perfecting the digital clock Fayetteville NC
- Perfecting the digital clock Forest City NC
- Perfecting the digital clock Fort Bragg NC
- Perfecting the digital clock Fuquay Varina NC
- Perfecting the digital clock Garner NC
- Perfecting the digital clock Gastonia NC
- Perfecting the digital clock Goldsboro NC
- Perfecting the digital clock Granite Falls NC
- Perfecting the digital clock Greensboro NC
- Perfecting the digital clock Greenville NC
- Perfecting the digital clock Havelock NC
- Perfecting the digital clock Henderson NC
- Perfecting the digital clock Hendersonville NC
- Perfecting the digital clock Hickory NC
- Perfecting the digital clock High Point NC
- Perfecting the digital clock Hillsborough NC
- Perfecting the digital clock Hope Mills NC
- Perfecting the digital clock Huntersville NC
- Perfecting the digital clock Jacksonville NC
- Perfecting the digital clock Kannapolis NC
- Perfecting the digital clock Kernersville NC
- Perfecting the digital clock King NC
- Perfecting the digital clock Kings Mountain NC
- Perfecting the digital clock Kinston NC
- Perfecting the digital clock Knightdale NC
- Perfecting the digital clock Laurinburg NC
- Perfecting the digital clock Leland NC
- Perfecting the digital clock Lenoir NC
- Perfecting the digital clock Lexington NC
- Perfecting the digital clock Lillington NC
- Perfecting the digital clock Lincolnton NC
- Perfecting the digital clock Louisburg NC
- Perfecting the digital clock Lumberton NC
- Perfecting the digital clock Marion NC
- Perfecting the digital clock Matthews NC
- Perfecting the digital clock Mebane NC
- Perfecting the digital clock Mocksville NC
- Perfecting the digital clock Monroe NC
- Perfecting the digital clock Mooresville NC
- Perfecting the digital clock Morganton NC
- Perfecting the digital clock Mount Airy NC
- Perfecting the digital clock Mount Olive NC
- Perfecting the digital clock Murphy NC
- Perfecting the digital clock New Bern NC
- Perfecting the digital clock North Wilkesboro NC
- Perfecting the digital clock Raeford NC
- Perfecting the digital clock Raleigh NC
- Perfecting the digital clock Reidsville NC
- Perfecting the digital clock Roanoke Rapids NC
- Perfecting the digital clock Rockingham NC
- Perfecting the digital clock Rocky Mount NC
- Perfecting the digital clock Roxboro NC
- Perfecting the digital clock Rutherfordton NC
- Perfecting the digital clock Salisbury NC
- Perfecting the digital clock Sanford NC
- Perfecting the digital clock Shelby NC
- Perfecting the digital clock Siler City NC
- Perfecting the digital clock Statesville NC
- Perfecting the digital clock Tarboro NC
- Perfecting the digital clock Taylorsville NC
- Perfecting the digital clock Thomasville NC
- Perfecting the digital clock Trinity NC
- Perfecting the digital clock Wake Forest NC
- Perfecting the digital clock Waxhaw NC
- Perfecting the digital clock Waynesville NC
- Perfecting the digital clock Weaverville NC
- Perfecting the digital clock Wendell NC
- Perfecting the digital clock Whiteville NC
- Perfecting the digital clock Williamston NC
- Perfecting the digital clock Wilmington NC
- Perfecting the digital clock Wilson NC
- Perfecting the digital clock Winston Salem NC
- Perfecting the digital clock Zebulon NC
Related Articles
Related Local Events
Breakfast & Business (PWN)
Dates: 11/24/2009 - 11/24/2009
Location: Durham Chamber
Durham, NC
View Details

Breakfast & Business (PWN)
Dates: 11/24/2009 - 11/24/2009
Location: Durham Chamber
Durham, NC
View Details

North Carolina Legislative Holiday Reception (Govt. Affairs)
Dates: 12/3/2009 - 12/3/2009
Location: Washington Duke Inn & Golf Club
Durham, NC
View Details

North Carolina Legislative Holiday Reception (Govt. Affairs)
Dates: 12/3/2009 - 12/3/2009
Location: Washington Duke Inn & Golf Club
Durham, NC
View Details

Automation Technology Expo South
Dates: 4/28/2010 - 4/29/2010
Location: Charlotte Convention Center
Charlotte, NC
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