943,027 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 95
  • JSP RSS
Aug 4th, 2010
0

text validation

Expand Post »
How to check text validations to form data entered by user?

Can any one write a code to do this in javascript?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Sam_john_2010 is offline Offline
2 posts
since Aug 2010
Aug 4th, 2010
0
Re: text validation
When do you want the validation to happen? When you click the submit button?
An easy way would be to have a button(type="button") and an onclick event:
JSP Syntax (Toggle Plain Text)
  1. <input type="button" value="Click" onclick="validate();" />

Then define a validate function, inside it use javascript to take the values of the fields you want to validate and if successful submit the form.

You will find good tutorials here:
http://www.w3schools.com/default.asp
Sponsor
Featured Poster
Reputation Points: 1005
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,256 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: Pagination and search function
Next Thread in JSP Forum Timeline: I am getting Syntax error : insert ": Expression" to complete Expression





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC