File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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: 14688

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...
It's not a secret anymore!