aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Form Validation Fully..." Watch "Form Validation Fully..." New topic
Author

Form Validation Fully...

Akshayan Venkatesh
Greenhorn

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..

if(name.value.length==0){
alert("Please Enter Your First Name");}
if(password.value.length==0){
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
3.Address..
Please tell me How Evaluate and Give the necessary Code...

Akshayan....
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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: http://aspose.com/file-tools
 
subject: Form Validation Fully...