lulu50
asked on
time validation
Hi,
I have two fields first one is Date identified and the second is time occurred
I want to say if Date Identified has a value then Time occurred is required.
this is what I have that is not working.
Thanks,
Lulu
I have two fields first one is Date identified and the second is time occurred
I want to say if Date Identified has a value then Time occurred is required.
this is what I have that is not working.
Thanks,
Lulu
<INPUT style="TEXT-ALIGN: center; WIDTH: 175px; HEIGHT: 23px" id=DateIdentifiedtxt value=03/28/2014 name=DateIdentifiedtxt data-format="MM/dd/yyyy" jQuery110205894598305599419="43">
</INPUT >
<INPUT style="TEXT-ALIGN: center; WIDTH: 165px; HEIGHT: 23px" value=00:00:00 name=TimeOccurredTxt data-format="hh:mm:ss" jQuery110205894598305599419="62">
</INPUT >
function ValidateForm()
{
var DateIdentified = $("#DateIdentifiedtxt").val();
var TimeOccurred = $("#TimeOccurredTxt").val();
if (DateIdentified != "" && (TimeOccurred === null || TimeOccurred === undefined ||
TimeOccurred === '00:00:00'))
{
alert("Time Occurred is required");
return false;
}
}
you should try to validate your HTML first : http://validator.w3.org/
ASKER
not sure what you mean by that
What is that link for? lol lol don't know what to do with it lol lol
ah I'm glad it's Friday.
What is that link for? lol lol don't know what to do with it lol lol
ah I'm glad it's Friday.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What is that link for? lol lol don't know what to do with it
Put URL of your web page in the address field
ASKER
GowthamNatarajan,
When I put in a real time, it tells me that the time field is undefined.
not sure why
When I put in a real time, it tells me that the time field is undefined.
not sure why
ASKER
Thank you