Quite simply, you are a legend! Thanks a million :-)
Main Topics
Browse All TopicsHi All,
I've tried to get a form validation working for 24 hour format but it just doesn't work, what am I doing wrong??? It needs to allow such an example as 02:30 or 22:45, etc.
Here's my code (it's the if statement that checks the field StartTime that is the issue)
function CheckFormEditTaskHeader(Fo
if (document.FormTaskHeader.J
{
alert("You need to enter a job name. \r\rPlease try again.")
document.FormTaskHeader.Jo
return false;
}
if (document.FormTaskHeader.M
{
alert("You need to enter a manager. \r\rPlease try again.")
document.FormTaskHeader.Ma
return false;
}
if (document.FormTaskHeader.J
{
alert("You need to enter a job type. \r\rPlease try again.")
document.FormTaskHeader.Jo
return false;
}
if (document.FormTaskHeader.S
var rg = new RegExp(/^([01][0-9]|2[0-3]
str.match(rg)
if (str.match(rg) == null) {
alert("You need to make sure the first letter is a J or j followed by atleast 5 numbers, for example J50001. \r\rPlease try again.")
document.FormTaskHeader.St
return false;
}
return true;
}
return true;
}
Thanks in advance for any help.
Neilos
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: Lolly-InkPosted on 2008-08-11 at 17:51:24ID: 22209430
You need to initialise the str variable. See line 22 below.
Select allOpen in new window