Perfecting the digital clock Michigan

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

Corporate IT Source
248-396-1573
6841 N. Rochester Rd.
Rochester Hills, MI
Cms Software
313-965-4775
500 Griswold St
Detroit, MI
Protocol Syst C
313-534-8773
18201 W 8 Mile Rd
Detroit, MI
All About Technology
313-962-2430
2727 2nd Ave
Detroit, MI
Computer Power Store
313-640-4681
15411 Mack Ave
Detroit, MI
L & M Office Products
313-861-5707
8514 W Mcnichols RD
Detroit, MI
Keane Inc
248-356-2000
3000 Northwestern St
Detroit, MI
Sync Technologies
313-963-5353
2727 2nd Ave
Detroit, MI
Woodwing USA
313-962-0542
615 Griswold St
Detroit, MI
PC Menders Computer Services
313-397-2713
18256 Grand River Ave
Detroit, MI

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

Corporate IT Source

248-396-1573
6841 N. Rochester Rd.
Rochester Hills, MI

Regional Articles
- Perfecting the digital clock Adrian MI
- Perfecting the digital clock Allegan MI
- Perfecting the digital clock Allen Park MI
- Perfecting the digital clock Alpena MI
- Perfecting the digital clock Ann Arbor MI
- Perfecting the digital clock Auburn Hills MI
- Perfecting the digital clock Battle Creek MI
- Perfecting the digital clock Bay City MI
- Perfecting the digital clock Belleville MI
- Perfecting the digital clock Benton Harbor MI
- Perfecting the digital clock Berkley MI
- Perfecting the digital clock Big Rapids MI
- Perfecting the digital clock Bloomfield Hills MI
- Perfecting the digital clock Brighton MI
- Perfecting the digital clock Burton MI
- Perfecting the digital clock Cadillac MI
- Perfecting the digital clock Canton MI
- Perfecting the digital clock Cheboygan MI
- Perfecting the digital clock Clarkston MI
- Perfecting the digital clock Clinton Township MI
- Perfecting the digital clock Clio MI
- Perfecting the digital clock Coldwater MI
- Perfecting the digital clock Commerce Township MI
- Perfecting the digital clock Comstock Park MI
- Perfecting the digital clock Davison MI
- Perfecting the digital clock Dearborn Heights MI
- Perfecting the digital clock Dearborn MI
- Perfecting the digital clock Detroit MI
- Perfecting the digital clock Dowagiac MI
- Perfecting the digital clock East Lansing MI
- Perfecting the digital clock Eastpointe MI
- Perfecting the digital clock Eaton Rapids MI
- Perfecting the digital clock Escanaba MI
- Perfecting the digital clock Farmington MI
- Perfecting the digital clock Fenton MI
- Perfecting the digital clock Ferndale MI
- Perfecting the digital clock Flat Rock MI
- Perfecting the digital clock Flint MI
- Perfecting the digital clock Flushing MI
- Perfecting the digital clock Fort Gratiot MI
- Perfecting the digital clock Fraser MI
- Perfecting the digital clock Garden City MI
- Perfecting the digital clock Gaylord MI
- Perfecting the digital clock Gladwin MI
- Perfecting the digital clock Grand Blanc MI
- Perfecting the digital clock Grand Haven MI
- Perfecting the digital clock Grand Ledge MI
- Perfecting the digital clock Grand Rapids MI
- Perfecting the digital clock Grandville MI
- Perfecting the digital clock Grosse Pointe MI
- Perfecting the digital clock Hamtramck MI
- Perfecting the digital clock Harper Woods MI
- Perfecting the digital clock Harrison Township MI
- Perfecting the digital clock Hazel Park MI
- Perfecting the digital clock Highland Park MI
- Perfecting the digital clock Hillsdale MI
- Perfecting the digital clock Holland MI
- Perfecting the digital clock Holly MI
- Perfecting the digital clock Holt MI
- Perfecting the digital clock Howell MI
- Perfecting the digital clock Hudsonville MI
- Perfecting the digital clock Inkster MI
- Perfecting the digital clock Ionia MI
- Perfecting the digital clock Jackson MI
- Perfecting the digital clock Jenison MI
- Perfecting the digital clock Kalamazoo MI
- Perfecting the digital clock Lake Orion MI
- Perfecting the digital clock Lansing MI
- Perfecting the digital clock Lapeer MI
- Perfecting the digital clock Lincoln Park MI
- Perfecting the digital clock Livonia MI
- Perfecting the digital clock Ludington MI
- Perfecting the digital clock Macomb MI
- Perfecting the digital clock Marquette MI
- Perfecting the digital clock Midland MI
- Perfecting the digital clock Monroe MI
- Perfecting the digital clock Mount Clemens MI
- Perfecting the digital clock Mount Morris MI
- Perfecting the digital clock Mount Pleasant MI
- Perfecting the digital clock Muskegon MI
- Perfecting the digital clock New Baltimore MI
- Perfecting the digital clock Niles MI
- Perfecting the digital clock Northville MI
- Perfecting the digital clock Novi MI
- Perfecting the digital clock Oak Park MI
- Perfecting the digital clock Okemos MI
- Perfecting the digital clock Owosso MI
- Perfecting the digital clock Petoskey MI
- Perfecting the digital clock Pinckney MI
- Perfecting the digital clock Plymouth MI
- Perfecting the digital clock Pontiac MI
- Perfecting the digital clock Port Huron MI
- Perfecting the digital clock Portage MI
- Perfecting the digital clock Redford MI
- Perfecting the digital clock Rochester MI
- Perfecting the digital clock Rockford MI
- Perfecting the digital clock Romulus MI
- Perfecting the digital clock Roseville MI
- Perfecting the digital clock Royal Oak MI
- Perfecting the digital clock Saginaw MI
- Perfecting the digital clock Saint Clair Shores MI
- Perfecting the digital clock Saint Johns MI
- Perfecting the digital clock Saline MI
- Perfecting the digital clock Sault Sainte Marie MI
- Perfecting the digital clock South Haven MI
- Perfecting the digital clock South Lyon MI
- Perfecting the digital clock Southfield MI
- Perfecting the digital clock Southgate MI
- Perfecting the digital clock Sterling Heights MI
- Perfecting the digital clock Sturgis MI
- Perfecting the digital clock Swartz Creek MI
- Perfecting the digital clock Taylor MI
- Perfecting the digital clock Temperance MI
- Perfecting the digital clock Three Rivers MI
- Perfecting the digital clock Traverse City MI
- Perfecting the digital clock Trenton MI
- Perfecting the digital clock Troy MI
- Perfecting the digital clock Utica MI
- Perfecting the digital clock Walled Lake MI
- Perfecting the digital clock Warren MI
- Perfecting the digital clock Waterford MI
- Perfecting the digital clock West Bloomfield MI
- Perfecting the digital clock Westland MI
- Perfecting the digital clock White Lake MI
- Perfecting the digital clock Wixom MI
- Perfecting the digital clock Wyandotte MI
- Perfecting the digital clock Wyoming MI
- Perfecting the digital clock Ypsilanti MI
- Perfecting the digital clock Zeeland MI
Related Articles
- Image Proportion Script Michigan
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.
- More work on the digital clock code! Michigan
- So, You Want to Layer, Huh? Part II Michigan
- Working with a Timer in C# Michigan
- The zones of the time zone clock Michigan
- Get It To The Text Box Michigan
- Create the Clock Michigan
Related Local Events
Real-Time & Embedded Computing Conference-Detroit (RTECC)
Dates: 9/17/2009 - 9/17/2009
Location: Sterling Inn Banquet & Conference Center, Detroit
Sterling Heights, MI
View Details

A&WMA CONFERENCE & EXHIBITION
Dates: 6/16/2009 - 6/19/2009
Location: Marriott Hotel Detroit, Detroit
Detroit, MI
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