Time Control in HTML

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I need to build a time control in HTML and am looking for some advice
for the best way to do this.  I need the control to allow users to
enter a time in the following format "11:46 am" and have it complain
when they do not.  Any ideas would be helpful, up to and including if
there is code out there that already does this.  I'm figuring some of
this will have to be done in javascript (because this is for an old
legacy asp app I'm doing this in) but am starting here first in this

Re: Time Control in HTML

writing in news:54fe68db-d514-4af4-b761-

Quoted text here. Click to load it

Cannot be done with HTML alone.  Client side script for validation is a
good idea, but you really need to do validation on the server to account
for those who do not have javascript enabled.

Now, one thing you _could_ do is present the input in two select boxes,

<select name="hour">
<option value="0">12am</option>
<option value="1">1am</option>
<option value="23">11pm</option>
<select name="minute">
<option value="0">00</option>
<option value="59">59</option>

Then you can put the two values together server side to make your time.


Adrienne Boswell at Home
Arbpen Web Site Design Services
Please respond to the group so others can share

Site Timeline