I am using the validate plugin for jQuery and want to show a loading div and hide the submit button after the validation is complete. The next page takes a while to load show I need to show a loading .gif and some text to let the user know what is happening.
I can’t do a simple on click show div1 and hide the submit button function because if there is an error then the button is hidden.
Any suggestions on how I can do this?
When you call the
validatemethod, there should be an option you can pass to it which is a function to be called when the form is valid.That is assuming you’re using this jQuery validation plugin: http://docs.jquery.com/Plugins/Validation