This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Form Validation Fully... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Form Validation Fully..." Watch "Form Validation Fully..." New topic

Form Validation Fully...

Akshayan Venkatesh

Joined: Apr 13, 2006
Posts: 26
I am Useing Javascript to evaluate a form using follwing code ..In this Code is Checking Properly but..It Display One by one..

alert("Please Enter Your First Name");}
alert("Please Enter your Last Name");}
if(add.value.length==0){alert("Please Enetr Address") }

and another user details...etc

If You submit this it will alert me ...But I want the alert or msg the Group of null values.. If the User Does not Mention the one or more details alert msg will display ..this manner or any

The Folloeing details you did not Enter Please Enter the Details.
1.User Name
2.Pass word
Please tell me How Evaluate and Give the necessary Code...

Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

Use a local string variable to store all messages and call alert() at the end.

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: Form Validation Fully...
Similar Threads
How to send alrt message from servlet to html
Using createElement() to make a temp form to submit.
Guestion is Validate the text?
JS text in html page
how to take either single number or double number in textbox