Get It To The Text Box

Now let's post the numbers to the text box.

provided by: 
Originally published at Internet.com


Scripper...

As if the numbers haven't been through enough, now, let's post them to the text box.

The Script's Effect

-----------------------------------

Here's the Code

The placement part of the function looks like this:

var dateTime = hour; dateTime = ((dateTime <10)? "0":"") + dateTime; dateTime = " " + dateTime; dateTime += ((minute < 10) ? ":0" : ":") + minute; dateTime += ((second < 10) ? ":0" : ":") + second; dateTime += " " + month + " " + date + ", " + year; document.clock.face.value = dateTime; document.clock.locationx.value = zone; setTimeout("checkDateTime()",900); }

We start by setting a new variable, "dateTime," to the hour. Remember that we took a great deal of effort to get that number accurate to the hour in the time zone where it would display. We'll use it to begin figuring out the remainder of the display.

Here's something new to the Script Tips, (?:) See that question mark and colon that pops in there a few times? That's JavaScript shorthand for an If/Else statement. The format is similar to the traditional If/Else. First there's a condition, then there are two items. If the condition is true, the first item is returned. If it is false, the second is returned...

Read article at Internet.com site
Regional Articles
- Get It To The Text Box Alabama
- Get It To The Text Box Alaska
- Get It To The Text Box Arizona
- Get It To The Text Box Arkansas
- Get It To The Text Box California
- Get It To The Text Box Colorado
- Get It To The Text Box Connecticut
- Get It To The Text Box DC
- Get It To The Text Box Delaware
- Get It To The Text Box Florida
- Get It To The Text Box Georgia
- Get It To The Text Box Hawaii
- Get It To The Text Box Idaho
- Get It To The Text Box Illinois
- Get It To The Text Box Indiana
- Get It To The Text Box Iowa
- Get It To The Text Box Kansas
- Get It To The Text Box Kentucky
- Get It To The Text Box Louisiana
- Get It To The Text Box Maine
- Get It To The Text Box Maryland
- Get It To The Text Box Massachusetts
- Get It To The Text Box Michigan
- Get It To The Text Box Minnesota
- Get It To The Text Box Mississippi
- Get It To The Text Box Missouri
- Get It To The Text Box Montana
- Get It To The Text Box Nebraska
- Get It To The Text Box Nevada
- Get It To The Text Box New Hampshire
- Get It To The Text Box New Jersey
- Get It To The Text Box New Mexico
- Get It To The Text Box New York
- Get It To The Text Box North Carolina
- Get It To The Text Box North Dakota
- Get It To The Text Box Ohio
- Get It To The Text Box Oklahoma
- Get It To The Text Box Oregon
- Get It To The Text Box Pennsylvania
- Get It To The Text Box Rhode Island
- Get It To The Text Box South Carolina
- Get It To The Text Box South Dakota
- Get It To The Text Box Tennessee
- Get It To The Text Box Texas
- Get It To The Text Box Utah
- Get It To The Text Box Vermont
- Get It To The Text Box Virginia
- Get It To The Text Box Washington
- Get It To The Text Box West Virginia
- Get It To The Text Box Wisconsin
- Get It To The Text Box Wyoming

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