cwolgamott
Programmer
Hello. I am creating some asp pages. On one of the pages, a modification page, I am trying to perform a date validation function. I know the function works, but I have been unsuccessful at getting it to work on multiple fields. For example, if one of the text boxes is empty, it says that text box needs a value of MM/DD/YY. Here is how I am trying to call the function:
function checktheboxes() {
if (isDate(document.form1.installdate.value) == false) Or (document.form1.installdate.value != ""
{
document.form1.installdate.focus();
return (false);
}
if (isDate(document.form1.maintdate.value) == false) Or (document.form1.maintdate.value != ""
{
document.form1.maintdate.focus();
return (false);
}
if (isDate(document.form1.readdate.value) == false) Or (document.form1.readdate.value != ""
{
document.form1.readdate.focus();
return (false);
}
return true;
}
It works ok if there is only one text box to check, but not for multiple text boxes. I would greatly appreciate any suggestions or hints. I call this function in the form tag. Thanks.
function checktheboxes() {
if (isDate(document.form1.installdate.value) == false) Or (document.form1.installdate.value != ""
{
document.form1.installdate.focus();
return (false);
}
if (isDate(document.form1.maintdate.value) == false) Or (document.form1.maintdate.value != ""
{
document.form1.maintdate.focus();
return (false);
}
if (isDate(document.form1.readdate.value) == false) Or (document.form1.readdate.value != ""
{
document.form1.readdate.focus();
return (false);
}
return true;
}
It works ok if there is only one text box to check, but not for multiple text boxes. I would greatly appreciate any suggestions or hints. I call this function in the form tag. Thanks.