aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes validating forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "validating forms" Watch "validating forms" New topic
Author

validating forms

Yugendra Reddy Guvvala
Greenhorn

Joined: Aug 06, 2007
Posts: 14
i wnat to validate my form and report if the required fields are not answered or in wrong format so please any one tell me how to report the errors in the same page without writing a new page for that i dont want a popup alert window i want to list on the top of teh page all the fields that were wrong?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

Are the validation checks happening on the client or server?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Yugendra Reddy Guvvala
Greenhorn

Joined: Aug 06, 2007
Posts: 14
client side validation
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

You are also validating on the server once the form gets submitted, correct?

With regards to the client-side validation, you don't need to pop up anything, just set aside a <div> element to receive error messages and add them as necessary when the validation takes place. You can either use the DOM API to add the necessary elements, or brute force it with innerHTML.
Yugendra Reddy Guvvala
Greenhorn

Joined: Aug 06, 2007
Posts: 14
thanku it worked
Yugendra Reddy Guvvala
Greenhorn

Joined: Aug 06, 2007
Posts: 14
how to validate a SSN number phonenumber and date in the form
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

Originally posted by Yugendra Reddy Guvvala:
how to validate a SSN number phonenumber and date in the form
What have you coded so far?
Yugendra Reddy Guvvala
Greenhorn

Joined: Aug 06, 2007
Posts: 14
i just checked wether the client have entered all the data into required field or not and now am validating teh entered data so i want to know how to check for SSN DATE PHONE NUMBER AND All
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

Are you familiar with regular expressions?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validating forms