jQuery Validate: Event if all valid and form submitted

Posted on 2011-03-02
Last Modified: 2012-05-11

I'm using jQuery Validate plugin from here -

The goal is to fire those two events only after jQuery validates all required fields and form has been submitted.

My code below does not work properly.

Any idea how to make it properly?

Thanks in advance
success: function(html) { 
		$("input[type='submit']").attr("disabled", true).val("Please wait...");


Open in new window

Question by:Aidam-Unlimited
  • 3
  • 2
LVL 82

Expert Comment

ID: 35021583
When you submit your form, you stay away from the page and so, from your code.
You're on another page, perhaps with the same url but an other new page

You may use ajax to submit your form silently and after the submission, display a message and go away

Check this plugin :

LVL 82

Expert Comment

ID: 35325755
How did you resolve it?

Accepted Solution

Aidam-Unlimited earned 0 total points
ID: 35325848
Solution is here.

If somebody found this useful, please let me know (post a comment).
$(document).ready(function() {

	 submitHandler: function(form) {
		$("input[type='submit']").attr("disabled", true).val("Please wait...");
	 errorPlacement: function(error, element) { } //Removed error labels, I've got input {border: red;} only

Open in new window

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.


Author Comment

ID: 35325860
LVL 82

Expert Comment

ID: 35326183

Expert Comment

ID: 35364775
Restarting auto-close process on Aidam-Unlimited's behalf after posting own solution.
Community Support Moderator

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question