In my CGI scripts, I've used external JavaScript calls for form validation.
Now I need to make an onClick java function call within the cgi (I'm assuming) script, that would enable or disable form fields based on the previous field. So if a user enters 1990 as their Year of Birth; they cannot enter e-mail address, without parents first contacting the site and electronically agreeing to terms & conditions. I have already build the server side validation, if JavaScript is bypassed, but need to make client side validation where ever possible.
Any advice?
Now I need to make an onClick java function call within the cgi (I'm assuming) script, that would enable or disable form fields based on the previous field. So if a user enters 1990 as their Year of Birth; they cannot enter e-mail address, without parents first contacting the site and electronically agreeing to terms & conditions. I have already build the server side validation, if JavaScript is bypassed, but need to make client side validation where ever possible.
Any advice?
Code:
print textarea ('yearOfBirth','','4','4');
== This below is what I'm thinkging how it would work?
print<<chkField;
function checkyearOfBith {
if thisFrom.checkyearOfBirth.search ??? {
thisForm.emailAddress.disable = true;
}
chkField
print textarea ('emailAddress,'','35','35');