That's awesome! It's working as expected now. Thanks for the reply, you made my day!!
I changed ".style.display = 'inline'; " to ".css({display:"inline"});" which also helped. I also noticed that the resulting page, which relied on the php variable $_POST[formname] being present didn't function, so I put in a hidden field and passed that instead. This was my first post and I'm very impressed! Thanks to all... ...LV On Jun 21, 8:25 am, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > You got two calls to validate, try this instead. > > $(document).ready(function(){ > > $("#register").validate({ > > highlight: function(element, errorClass) { > $(element).addClass(errorClass); > $(element.form).find("label[for=" + element.id + > "]").addClass(errorClass); > }, > unhighlight: function(element, errorClass) { > $(element).removeClass(errorClass); > $(element.form).find("label[for=" + element.id + > "]").removeClass(errorClass); > }, > > submitHandler: function(form) { > $('#SubmitFormBtn').style.display = 'none'; > $('#PleaseWait').style.display = 'inline'; > form.submit(); > } > > }); > }); > > Jörn > > On Sat, Jun 21, 2008 at 1:07 PM, LVR <[EMAIL PROTECTED]> wrote: > > > I'm using the 'Validate' plugin for simple form validation - using > > 'highlight' and 'unhighlight'. That part is working (though sometimes > > the label elements disappear totally - but that's another issue). > > What I'm trying to accomplish is this: When the form is valid, I want > > to replace the submit button with an animated gif while the form is > > submitting. From what I've read, I need a submitHandler. I'm a > > novice at js and even more so with jQuery. Can anyone tell me what's > > wrong with this code? > > > $(document).ready(function(){ > > > $("#register").validate({ > > > highlight: function(element, errorClass) { > > $(element).addClass(errorClass); > > $(element.form).find("label[for=" + element.id + > > "]").addClass(errorClass); > > }, > > unhighlight: function(element, errorClass) { > > $(element).removeClass(errorClass); > > $(element.form).find("label[for=" + element.id + > > "]").removeClass(errorClass); > > } > > }); > > > $("#register").validate({ > > submitHandler: function(form) { > > $('#SubmitFormBtn').style.display = 'none'; > > $('#PleaseWait').style.display = 'inline'; > > form.submit(); > > } > > }); > > > }); > > > Thanks! > > ...LV