I've been able to use the same piece of javascript code for form validation on several websites that I maintain. However, one site that I update for a nonprofit, doesn't function properly with the form validation code. Is there something in the code that I'm missing? The test page I'm working on is http://lauraliswood.org/contact2.htm
I'm trying to use the following validation code: <script type="text/javascript"> function validate_required(field,alerttxt) { with (field) { if (value==null||value=="") {alert(alerttxt);return false;} else {return true} } } function validate_form(ContactForm) { with (ContactForm) { if (validate_required(FirstName,"Please enter your First Name.") ==false) {FirstName.focus();return false;} if (validate_required(LastName,"Please enter your Last Name.")==false) {LastName.focus();return false;} if (validate_required(Email,"Please enter your email address.") ==false) {Email.focus();return false;} } } </script> If anyone can help me out, I'd really appreciate it. This website was using FrontPage extensions for this form, but the server was getting rid of the extensions so I had to create a functioning form with a .pl script and now I'm trying to use javascript to create required fields. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---