Skip to content Skip to sidebar Skip to footer

Send Image With Ajax , Using Jquery Validator On Submithandler

I trying to send two images with ajax (inside submitHandler) after using jquery validator plugin and i don't know hoy i cant take and send this image by ajax. My code here: var sub

Solution 1:

I resolve this..

Just change a little party on my code..

var submitHandler = function(form) {
    $.ajax({
        url: 'function/savePreInscripcion.php',
        type: 'POST',
        data: newFormData(form),
        mimeType: "multipart/form-data",
        contentType: false,
        cache: false,
        processData: false,
        success: function(data){
            alert(data);
        }
    });
};

Just I change the call to the form and put this directly on the data whit the next code: "data: new FormData(form)" and it work fine! =)

Post a Comment for "Send Image With Ajax , Using Jquery Validator On Submithandler"