OZONE Asylum
Forums
Server-Side Scripting - Oh my!
Form Validation Problem
This page's ID:
31091
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Hi, I am trying to validate a form, and am getting the error messages as needed, but it submits the form anyway. Here is the Java: function validate (form){ var returnValue = true; var email = CSLavRequestForm.email.value; var phone = CSLavRequestForm.phoneNumber.value; var groupName = CSLavRequestForm.workshopName.value; if (email.length < 6){ returnValue = false; alert("Please Enter Valid email"); CSLavRequestForm.email.focus(); } if (phone.length < 10){ returnValue = false; alert("Please Enter Valid Phone Number"); CSLavRequestForm.phone.focus(); } if (groupName.length < 3){ returnValue = false; alert("Please Enter Valid Workshop/Region"); CSLavRequestForm.groupName.focus(); } return returnValue; } </script> and the form line in the html: <form onsubmit="return validate(this);" action="/cgi-sys/formmail.pl" method="post" name="CSLavRequestForm" id="CSLavRequestForm" > I am stuck! Benn working on this for way too long
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail