For my first question I ended up switching from the jalerts plugin to
just using the jquery ui dialog box.  Seems to work well.  The issue
is that the jalerts popup doesn't use a previously configured div on
the page to show things...it creates a new one...so the validation
plugin has no place to display the error messages and you can't get
access to them (yet).

The second issue is that you can set the errorContainer and
errorLabelContainer to an empty string and the errors just won't be
put anywhere...but that isn't useful unless you can get access to the
set of error messages.

On Oct 12, 3:56 pm, Mike <mike.ab...@gmail.com> wrote:
> I'm trying to write a custom display for the error messages on my
> form.  Ideally I'd like to use a modal pop-up window to display the
> errors, but I'm having trouble figuring out how to prevent the
> validation plugin from automatically displaying the errors on my page
> AND I can't quite figure out how to access the individual error
> messages for the elements on my form.
>
> What I want to do is to allow users to save invalid forms, but to warn
> them that they are invalid to make them confirm that they want to
> save.
>
> I have something like this:
>
> invalidHandler: function(form, validator) {
>   //some code here figuring out if specific elements are within
> maxlength so as not to blow up the db
>
>   if (canSave) {  //canSave determined in the comments above
>    var msg = "There are errors...";
>
>    for(errors in validator.errors) {
>      msg = msg + "<br/>" + errors.message;
>    }
>
>     jConfirm(msg, 'You can still save!', function(r) {
>                                                         if (r){
>                                                           
> document.forms['myform'].submit();
>                                                         }
>                                                         else {
>                                                         }
>                                                 });
>
>    if (
>   }
>   else {
>     jAlert('Cannot save right now', 'Unable to save');
>   }
>
> }
>
> Can I get access to the list of errors from the validator or even
> individually for each element in my form?
>
> and
>
> Can I turn off the auto showing of errors?
>
> Thanks!

Reply via email to