T
Taz Lake
Any JavaScript folks want to take a shot at this? I have a larger
JavaScript that is doing form validation (I can provide it if needed).
But this particular piece of code causes the entire script to fail
(i.e., not execute) and allows the form to be submitted. As soon as I
remove it, the validation works fine.
if (employment_status.selectedIndex == 3 ||
employment_status.selectedIndex == 4 ||
employment_status.selectedIndex == 5 ||
employment_status.selectedIndex == 6) && (contract_end_date.value ==
"")
{
alert ("You must select an end date for the new hire if they are a
contractor or temporary employee in order to submit the New Hire
Form.")
employment_status.focus()
return false
}
Any help is appreciated as I've looked at this quite and bit nothing
jumps out. Please reply to the board so all can benefit.
Thanks,
Taz
JavaScript that is doing form validation (I can provide it if needed).
But this particular piece of code causes the entire script to fail
(i.e., not execute) and allows the form to be submitted. As soon as I
remove it, the validation works fine.
if (employment_status.selectedIndex == 3 ||
employment_status.selectedIndex == 4 ||
employment_status.selectedIndex == 5 ||
employment_status.selectedIndex == 6) && (contract_end_date.value ==
"")
{
alert ("You must select an end date for the new hire if they are a
contractor or temporary employee in order to submit the New Hire
Form.")
employment_status.focus()
return false
}
Any help is appreciated as I've looked at this quite and bit nothing
jumps out. Please reply to the board so all can benefit.
Thanks,
Taz