I have 2 fields; start time and end time.
I want to verify that users enter the time in the correct format for both fields.
By correct format I mean; (HH:MM format). Ex: 12:00
I know a function of some sort can accomplish this, I just cannot figure out how it would be done. I have searched all over and can’t find any examples of this and was wondering if anyone could point me in the right direction?
Here is the code:
[CODE]<html>
<head></head>
<body>
<form name=”myform” method=”post” action=”next.asp”>
<table bgcolor=”#ffffff” border=”0″ width=”250″ cellspacing=”1″ cellpadding=”2″ class=”main”>
<tr>
<td bgcolor=”#FFFFFF”>Start Time:</td>
<td bgcolor=”#FFFFFF”><input type=”text” name=”startTime” maxlength=”5″ size=”5″> (HH:MM format)</td>
</tr>
<tr>
<td bgcolor=”#FFFFFF”>End Time:</td>
<td bgcolor=”#FFFFFF”><input type=”text” name=”endTime” maxlength=”5″ size=”5″> (HH:MM format)</td>
</tr>
</table>
<input type=”Submit” value=”Continue” name=”Continue”>
</body>
</html>