Perfecting the digital clock Wisconsin

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

Practice Management Solutions Inc
414-352-8160
7571 N Teutonia Ave
Milwaukee, WI
codeeo
608 305 1060
1360 Regent Street #155
Madison, WI
Gates Business Solutions
608-661-0810
2810 CrossRoads DR
Madison, WI
Madison Software Inc
608-833-5410
6666 Odana Rd
Madison, WI
Electroniclaim
262-240-9700
11357 N. Port Washington Rd
Mequon, WI
KMSpecialties
414-751-4009
7434-3 Halverson Rd
Three Lakes, WI
Image Processing Software Inc
608-233-5033
6409 Appalachian Way
Madison, WI
Gbl Software LLC
414-760-9029
6417 W Hustis St
Milwaukee, WI
Access Technologies International
414-289-3121
840 N Old World 3rd St
Milwaukee, WI
Guild Software Inc
414-259-0959
10437 W Innovation DR
Milwaukee, WI

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

Practice Management Solutions Inc

414-352-8160
7571 N Teutonia Ave
Milwaukee, WI

Related Articles
- Image Proportion Script Wisconsin
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.
- So, You Want to Layer, Huh? Part II Wisconsin
- Working with a Timer in C# Wisconsin
- More work on the digital clock code! Wisconsin
- The zones of the time zone clock Wisconsin
- Create the Clock Wisconsin
- Get It To The Text Box Wisconsin
Regional Articles
- Perfecting the digital clock Appleton WI
- Perfecting the digital clock Baraboo WI
- Perfecting the digital clock Beaver Dam WI
- Perfecting the digital clock Beloit WI
- Perfecting the digital clock Brookfield WI
- Perfecting the digital clock Burlington WI
- Perfecting the digital clock Cedarburg WI
- Perfecting the digital clock Chippewa Falls WI
- Perfecting the digital clock Cudahy WI
- Perfecting the digital clock De Pere WI
- Perfecting the digital clock Delavan WI
- Perfecting the digital clock Eau Claire WI
- Perfecting the digital clock Elkhorn WI
- Perfecting the digital clock Fond Du Lac WI
- Perfecting the digital clock Fort Atkinson WI
- Perfecting the digital clock Franklin WI
- Perfecting the digital clock Green Bay WI
- Perfecting the digital clock Hartland WI
- Perfecting the digital clock Janesville WI
- Perfecting the digital clock Kaukauna WI
- Perfecting the digital clock Kenosha WI
- Perfecting the digital clock La Crosse WI
- Perfecting the digital clock Lake Geneva WI
- Perfecting the digital clock Madison WI
- Perfecting the digital clock Manitowoc WI
- Perfecting the digital clock Marinette WI
- Perfecting the digital clock Marshfield WI
- Perfecting the digital clock Menasha WI
- Perfecting the digital clock Menomonee Falls WI
- Perfecting the digital clock Menomonie WI
- Perfecting the digital clock Merrill WI
- Perfecting the digital clock Middleton WI
- Perfecting the digital clock Milwaukee WI
- Perfecting the digital clock Mosinee WI
- Perfecting the digital clock Mukwonago WI
- Perfecting the digital clock Muskego WI
- Perfecting the digital clock Neenah WI
- Perfecting the digital clock New Berlin WI
- Perfecting the digital clock Oak Creek WI
- Perfecting the digital clock Oconomowoc WI
- Perfecting the digital clock Onalaska WI
- Perfecting the digital clock Oshkosh WI
- Perfecting the digital clock Pewaukee WI
- Perfecting the digital clock Racine WI
- Perfecting the digital clock Rhinelander WI
- Perfecting the digital clock Rice Lake WI
- Perfecting the digital clock River Falls WI
- Perfecting the digital clock Schofield WI
- Perfecting the digital clock Shawano WI
- Perfecting the digital clock Sheboygan WI
- Perfecting the digital clock South Milwaukee WI
- Perfecting the digital clock Stevens Point WI
- Perfecting the digital clock Sturgeon Bay WI
- Perfecting the digital clock Sun Prairie WI
- Perfecting the digital clock Superior WI
- Perfecting the digital clock Thiensville WI
- Perfecting the digital clock Two Rivers WI
- Perfecting the digital clock Watertown WI
- Perfecting the digital clock Waukesha WI
- Perfecting the digital clock Waupaca WI
- Perfecting the digital clock Wausau WI
- Perfecting the digital clock West Bend WI
- Perfecting the digital clock Whitewater WI
- Perfecting the digital clock Wisconsin Rapids WI

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