AllExperts > DHTML 
Search      
DHTML
Volunteer
Answers to thousands of questions
 Home · More DHTML Questions · Answer Library  · Encyclopedia ·
More DHTML Answers
Question Library

Ask a question about DHTML
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Ernesto de Lara
Expertise
web site design, web pages and banners design, html, dhtml, javascript, asp, sql, graphics, electronics, analog, integrated circuits and electronic circuits design and manufacturing

Experience

Past/Present clients
mexican customers

 
   

You are here:  Experts > Computing/Technology > HTML/XML > DHTML > Form Validation

DHTML - Form Validation


Expert: Ernesto de Lara - 3/13/2007

Question
Hi Ernesto,
I work with Dreamweaver and have used it's form validation feature which works fine but it a quite limited. What I have is a form that has questions with multichoice answers which are selected by clicking a radio button. On submitting I want the user to be prompted to "try again" on questions they have not answered correctly. ie The form will not be submitted until all the questions are answered correctly. (It's a learning thing more than a test)Is there an easy way to this or do I need some complex programing done?
Thanks
Richard  

Answer
Hi Richard
Yes, you do need some coding to do that. Hopefully it is not very complex. It is done with javascript. However, you should write this code by yourself since I donīt know how Dreamweaver can help it.
The things works like this: You start trapping the act of submitting the form using the javascript onsubmit event. When this event occurs a validation routine takes places looking for wrong answers from the user. In that case the form is not validated showing the user the need for a "try again" action.
You can find a lot of detail explanations, tutorials and ready to copy code using the words [javascript onsubmit form validation] in your search at google.

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.