Hello,

just try:

                        submitHandler: function(form) {

                    $.ajax({
                            type: 'POST',
                                url: 'sendmail.php',
                            data: $('#FormName').serialize(),
                                success: function(responseText) {
                                                        alert(responseText);
                        }
                        });
                        }

Mesut TUNGA



On 15 Ocak, 21:59, koenoe <koenrom...@gmail.com> wrote:
> Hi there!
>
> When I do an ajaxSubmit using the form plugin I don't get a response
> by using the succes option.
>
> I make an ajaxSubmit in thesubmitHandleroption from the validate
> plugin.
>
> Part of my code:
>
> submitHandler: function(form) {
>         $(form).ajaxSubmit({
>                 type: "POST",
>                 clearForm: true,
>                 url: "sendmail.php",
>                 succes: function(data) {
>                         alert(data);
>                 }
>         });
>         return false;
>
> }
>
> I've tried a lot but without succes. I already tried this:
> - replacing $(form) with $("#idForm")
> - before the ajaxSubmit function a $(form).submit(function() { with a
> return false
>
> When I use this code it works sometimes but then I'm not able to add
> options to my ajaxSubmit function :
>
> $(form).ajaxSubmit(function(data) {
>       alert(data);
>
> });
>
> I hope someone can help me.
>
> Thanks in advance!
>
> Greetings,
>
> Koen

Reply via email to