I use another jQuery Validation plugin (jQuery.YAV) but I think that
in *submitHandler* you need *return false* for to cancel the normal
behaviour.

submitHandler: function(form) {
        $("#interv").ajaxSubmit(options2);},
        return false;
});



Freud escribió:
Hi,

first of all, excuse me for my language, I'm french ;) so I'll try to
make it simple...

I'm using the JQuery Form Plugin and it works perfectly fine :

$(document).ready(function() {
        var options2 = {
        target:        "#alertes",
        url:      "soa.php?action=modif"
    };

    $("#interv").submit(function() {
        $(this).ajaxSubmit(options2);
        return false;
    });
});

I tried the validation form plugin, which is quite amazing, and it
also works great.

$(document).ready(function() {
        $.validator.setDefaults({
                errorContainer: $("#alertes"),
                errorLabelContainer: $("#alertes ul"),
                errorWrapper: "li",
                rules: {
                                   int_societe: { required: true }
              },
              messages: {
            int_societe: "Test soc"
            }
                //,submitHandler: function(form) {$
("#interv").ajaxSubmit(options2);},
       });
      $("#interv").validate();
});


Now, I wanna use both. That's where it started to go wrong. When I
uncomment the SubmitHandler line, the validation is still OK but the
form is submitted normally, not using the Ajaxian method.

Could someone help me on this case ? I spent my night on this stuff
and I start feeling depressed :)

Thx,
Freud




--
Best Regards,
José Francisco Rives Lirola <sevir1ATgmail.com>

SeViR CW · Computer Design
http://www.sevir.org
Murcia - Spain

Reply via email to