Answer the question
In order to leave comments, you need to log in
Ajax, how to find out what data was transferred?
How to find out what was passed to the handler, and whether it was passed at all?
$(function(){
$(function(){
'use strict';
$('.form').on('submit', function(e){
e.preventDefault();
if ($(this).valid()) {
var msg = new FormData(this);
$.ajax({
url: 'scripts/mail.php',
type: 'POST',
contentType: false,
processData: false,
data: msg,
success: function() {
$('form').trigger('reset');
$('#modalSuccess').modal('show');
},
error: function() {
$('form').trigger('reset');
$('#modalError').modal('show');
}
});
};
});
});
Answer the question
In order to leave comments, you need to log in
open the console in the browser and see what was transmitted and what the server responded to and everything else:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question