posted 17 years ago
This isn't Struts-related, but JavaScript and DOM.
1) You need to use the DOM form element.
2) You need to use the form values from that form element, the JavaScript you show has something called "contact" in it that seems to appear out of nowhere.
I'd recommend searching the web for "javascript form validation".
Dave