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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Jquery form validation" Watch "Jquery form validation" New topic
Author

Jquery form validation

David Mbura
Ranch Hand

Joined: Apr 06, 2010
Posts: 65
Hello guys
I am a beginer in jquery. For some reason Validation wont work....after() wont display error message..what could be wrong?
Thank you in advance.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61755
    
  67

I see a number of things that could go awry. Firstly, establishing a click handler on a div around the submit button for the form in order to do validation is just, well, rather odd.

Step 1 to cleanup is to get rid of that click handler and replace it with a submit handler for the form. That's the appropriate place to do validation.

And please, next time you post your code, please fix up the indentation properly. Badly indented code is very hard to read.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61755
    
  67

P.S. Why aren't you using the Validation Plugin rather than rolling your own?
David Mbura
Ranch Hand

Joined: Apr 06, 2010
Posts: 65
Thank you a lot Bear ...i tried to look for the plugin but i didnt find one that suits my needs,from the code ,can you suggest any validation plugin?
Thank you again!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61755
    
  67

http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jquery form validation