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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.


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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now