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


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 56547
    
  14

Are the validation checks happening on the client or server?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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: 56547
    
  14

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: 56547
    
  14

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: 56547
    
  14

Are you familiar with regular expressions?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: validating forms
 
Similar Threads
page numbering problem
exec() command
Creating Jasper Report at client machine
printing report in PDF
Crystal reports-formula for date(date should be constant )