On 11/03/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Rick Faircloth schrieb:
> > onInvalid: function(form) {
> >     $(form).find("[EMAIL PROTECTED]").attr("disabled", "disabled");
> > },
> > onValid: function(form) {
> >     $(form).find("[EMAIL PROTECTED]").attr("disabled", "");
> > }
> >
> >
> >
> > That looks good to me!  Hopefully that will work.  I'm using Jorn's plug-in
> > in debug mode, which is supposed to prevent submission whether the
> > form fields are correct or not.  However, since I'm using other script which
> > works in an Ajax manner to submit the entries to another page, I think
> > that's
> > interfering somewhat with Jorn's plug-in and its control over the process.
> >
> > I'll tinker around with your methods above and see what happens.
> >
> > Hopefully, Jorn will show up and provide us some assistance, too...
> >
> See the other thread. Just write your own submitHandler, that way you
> don't need to disable anything.
>
> --
> Jörn Zaefferer
>
> http://bassistance.de

While you can do that, making the button disabled is a good visual
indication (in addition to the error message(s)) and prevents the
click in the first place. There may be other reasons you may want to
call a function when everything is OK, or there is an error (maybe
highlight /animate the fields with errors?).

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to