More work on the digital clock code! Illinois

Today we begin playing around with replacing those image tags with the correct numbers, depending on what time it is.

Local Companies

Softweb Solutions
866-345-7638
5707 Breezeland Road
Chicago, IL
STL Technology Partners
(309) 699-6389
630 High Point Lane
East Peoria, IL
DMi Technology Group
(309) 828-4439
406 Kays Drive
Normal, IL
InterraIT
(630) 873-3525
Two Mid America Plaza
Oakbrook Terrace, IL
StrategicSytems International
+1.847.424.2497
820 Davis Street,
Evanston, IL
Quantum Design (Quantum Software Solutions)
815-885-1300
8400 E. Riverside Blvd
Rockford, IL
IT360, Inc.
(309) 283-2915
311 SW Water Street
Peoria, IL
Stellar Systems, Inc
(309) 677-7350
222 NE Monroe St. #902
Peoria, IL
Stellar Systems, Inc.
(309) 677-7350
222 NE Monroe St. #902
Peoria, IL
IFS
888-437-4968
300 Park Boulevard, Suite 555
Itasca, IL

provided by: 
Originally published at Internet.com


Tips...

Last week we learned the NAMEs attached to each of the HTML image tags. Today we begin playing around with replacing those image tags with the correct numbers, depending on what time it is.

Here's the code

The time is grabbed from the user's browser, so there's no need to worry about daylight savings time or time zones. As long as the viewer has his or her browser set correctly, you're good to go. If they don't, well, you can't help that.

Let's start at the top of the script just below the loading loop and code: function clock() { dates=new Date(); hour=dates.getHours(); min=dates.getMinutes(); sec=dates.getSeconds(); if(hour < 12) { amPM=am.src; } if(hour > 11) { amPM=pm.src; hour=hour-12; } if(hour == 0) { hour=12; } if(hour < 10) { document["tensHour"].src="http://www.developer.com/dgtbl.gif"; document["Hour"].src=d[hour].src; } if(hour > 9) { document["tensHour"].src=d[1].src; document["Hour"].src=d[hour-10].src; } 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); } ...

Read article at Internet.com site

Featured Local Company

Softweb Solutions

IT Consultant Company offers custom software development services, Flex, ROR, Web application development services

866-345-7638
5707 Breezeland Road
Chicago, IL
http://www.SoftwebSolutions.com

Softweb Solutions is a prominent name in providing exclusive software development services for SMEs, specializing in custom application development, website development, system integration and software testing and quality assurance, with industry-specific software expertise in High-Technology, Software, Automotive, Financial Services and Entertainment sectors.

Custom Software Development and IT Consultant

Regional Articles
- More work on the digital clock code! Addison IL
- More work on the digital clock code! Algonquin IL
- More work on the digital clock code! Alsip IL
- More work on the digital clock code! Alton IL
- More work on the digital clock code! Arlington Heights IL
- More work on the digital clock code! Aurora IL
- More work on the digital clock code! Barrington IL
- More work on the digital clock code! Bartlett IL
- More work on the digital clock code! Batavia IL
- More work on the digital clock code! Belleville IL
- More work on the digital clock code! Bellwood IL
- More work on the digital clock code! Belvidere IL
- More work on the digital clock code! Bensenville IL
- More work on the digital clock code! Berwyn IL
- More work on the digital clock code! Bloomingdale IL
- More work on the digital clock code! Bloomington IL
- More work on the digital clock code! Blue Island IL
- More work on the digital clock code! Bolingbrook IL
- More work on the digital clock code! Bourbonnais IL
- More work on the digital clock code! Bridgeview IL
- More work on the digital clock code! Buffalo Grove IL
- More work on the digital clock code! Calumet City IL
- More work on the digital clock code! Carbondale IL
- More work on the digital clock code! Carol Stream IL
- More work on the digital clock code! Carpentersville IL
- More work on the digital clock code! Champaign IL
- More work on the digital clock code! Chicago Heights IL
- More work on the digital clock code! Chicago IL
- More work on the digital clock code! Cicero IL
- More work on the digital clock code! Clarendon Hills IL
- More work on the digital clock code! Collinsville IL
- More work on the digital clock code! Country Club Hills IL
- More work on the digital clock code! Crete IL
- More work on the digital clock code! Crystal Lake IL
- More work on the digital clock code! Danville IL
- More work on the digital clock code! Decatur IL
- More work on the digital clock code! Deerfield IL
- More work on the digital clock code! Dekalb IL
- More work on the digital clock code! Des Plaines IL
- More work on the digital clock code! Dolton IL
- More work on the digital clock code! Downers Grove IL
- More work on the digital clock code! East Moline IL
- More work on the digital clock code! East Peoria IL
- More work on the digital clock code! East Saint Louis IL
- More work on the digital clock code! Edwardsville IL
- More work on the digital clock code! Effingham IL
- More work on the digital clock code! Elgin IL
- More work on the digital clock code! Elk Grove Village IL
- More work on the digital clock code! Elmhurst IL
- More work on the digital clock code! Elmwood Park IL
- More work on the digital clock code! Evanston IL
- More work on the digital clock code! Evergreen Park IL
- More work on the digital clock code! Fairview Heights IL
- More work on the digital clock code! Franklin Park IL
- More work on the digital clock code! Freeport IL
- More work on the digital clock code! Galesburg IL
- More work on the digital clock code! Glen Ellyn IL
- More work on the digital clock code! Glendale Heights IL
- More work on the digital clock code! Glenview IL
- More work on the digital clock code! Godfrey IL
- More work on the digital clock code! Granite City IL
- More work on the digital clock code! Grayslake IL
- More work on the digital clock code! Gurnee IL
- More work on the digital clock code! Harvey IL
- More work on the digital clock code! Harwood Heights IL
- More work on the digital clock code! Hazel Crest IL
- More work on the digital clock code! Highland Park IL
- More work on the digital clock code! Hinsdale IL
- More work on the digital clock code! Homewood IL
- More work on the digital clock code! Jacksonville IL
- More work on the digital clock code! Joliet IL
- More work on the digital clock code! Kankakee IL
- More work on the digital clock code! Kewanee IL
- More work on the digital clock code! La Grange IL
- More work on the digital clock code! Lake Bluff IL
- More work on the digital clock code! Lake Villa IL
- More work on the digital clock code! Lake Zurich IL
- More work on the digital clock code! Lansing IL
- More work on the digital clock code! Lemont IL
- More work on the digital clock code! Libertyville IL
- More work on the digital clock code! Lisle IL
- More work on the digital clock code! Lockport IL
- More work on the digital clock code! Lombard IL
- More work on the digital clock code! Loves Park IL
- More work on the digital clock code! Machesney Park IL
- More work on the digital clock code! Matteson IL
- More work on the digital clock code! Mattoon IL
- More work on the digital clock code! Maywood IL
- More work on the digital clock code! Mchenry IL
- More work on the digital clock code! Melrose Park IL
- More work on the digital clock code! Midlothian IL
- More work on the digital clock code! Mokena IL
- More work on the digital clock code! Moline IL
- More work on the digital clock code! Morris IL
- More work on the digital clock code! Morton Grove IL
- More work on the digital clock code! Morton IL
- More work on the digital clock code! Mount Prospect IL
- More work on the digital clock code! Mundelein IL
- More work on the digital clock code! Murphysboro IL
- More work on the digital clock code! Naperville IL
- More work on the digital clock code! New Lenox IL
- More work on the digital clock code! Niles IL
- More work on the digital clock code! Normal IL
- More work on the digital clock code! North Chicago IL
- More work on the digital clock code! Northbrook IL
- More work on the digital clock code! O Fallon IL
- More work on the digital clock code! Oak Forest IL
- More work on the digital clock code! Oak Lawn IL
- More work on the digital clock code! Oak Park IL
- More work on the digital clock code! Orland Park IL
- More work on the digital clock code! Palatine IL
- More work on the digital clock code! Palos Hills IL
- More work on the digital clock code! Park Forest IL
- More work on the digital clock code! Park Ridge IL
- More work on the digital clock code! Pekin IL
- More work on the digital clock code! Peoria IL
- More work on the digital clock code! Plainfield IL
- More work on the digital clock code! Prospect Heights IL
- More work on the digital clock code! Quincy IL
- More work on the digital clock code! Riverdale IL
- More work on the digital clock code! Rochelle IL
- More work on the digital clock code! Rock Falls IL
- More work on the digital clock code! Rock Island IL
- More work on the digital clock code! Rockford IL
- More work on the digital clock code! Rolling Meadows IL
- More work on the digital clock code! Romeoville IL
- More work on the digital clock code! Roscoe IL
- More work on the digital clock code! Roselle IL
- More work on the digital clock code! Round Lake IL
- More work on the digital clock code! Saint Charles IL
- More work on the digital clock code! Schaumburg IL
- More work on the digital clock code! Skokie IL
- More work on the digital clock code! South Elgin IL
- More work on the digital clock code! South Holland IL
- More work on the digital clock code! Springfield IL
- More work on the digital clock code! Streamwood IL
- More work on the digital clock code! Streator IL
- More work on the digital clock code! Sycamore IL
- More work on the digital clock code! Taylorville IL
- More work on the digital clock code! Tinley Park IL
- More work on the digital clock code! Urbana IL
- More work on the digital clock code! Vernon Hills IL
- More work on the digital clock code! Villa Park IL
- More work on the digital clock code! Waukegan IL
- More work on the digital clock code! West Chicago IL
- More work on the digital clock code! Westchester IL
- More work on the digital clock code! Westmont IL
- More work on the digital clock code! Wheaton IL
- More work on the digital clock code! Wheeling IL
- More work on the digital clock code! Wilmette IL
- More work on the digital clock code! Wood Dale IL
- More work on the digital clock code! Woodridge IL
- More work on the digital clock code! Woodstock IL
- More work on the digital clock code! Zion IL
Related Local Events
Virtualization / Consolidation Strategies - Implementation Strategies
Dates: 12/10/2009 - 12/10/2009
Location: The Donald E. Stephens Convention Center
Rosemont, IL
View Details

BIO - International Convention and Exhibition for Biotechnology
Dates: 5/2/2010 - 5/5/2010
Location: McCormick Place
Chicago, IL
View Details

PTXi - Process Technology Expo International
Dates: 5/4/2010 - 5/6/2010
Location: Donald E. Stephens Convention Center
Rosemont, IL
View Details

The CIO Agenda - 2010 and Beyond
Dates: 11/5/2009 - 11/5/2009
Location: The Donald E. Stephens Convention Center
Rosemont, IL
View Details

SuperComm
Dates: 10/21/2009 - 10/23/2009
Location: McCormick Place, Chicago
Chicago, IL
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