Just beginning to work with javascript and doing some client side validation routines for an HTML form.
What I have working is simple checks to make sure required fields have information in them.
if (document.formname.vbDate.value == ""
{
alert("Please enter date"
document.formname.vbDate.focus()
return false
}
No problem. What I want to do is make sure that they typed in a valid date (00/00/00 format). My guess is that I use "type" instead of "value", but I just don't know the exact coding and no Java books handy. Could someone give me the actual code line example that makes this work? Or let me know if it's not that easy?
Again this is client-side validation in a web page.
Thanks.
Pandyon
What I have working is simple checks to make sure required fields have information in them.
if (document.formname.vbDate.value == ""
{
alert("Please enter date"
document.formname.vbDate.focus()
return false
}
No problem. What I want to do is make sure that they typed in a valid date (00/00/00 format). My guess is that I use "type" instead of "value", but I just don't know the exact coding and no Java books handy. Could someone give me the actual code line example that makes this work? Or let me know if it's not that easy?
Again this is client-side validation in a web page.
Thanks.
Pandyon