I have changed all URLs to absolute. Did not solve the problem.
This is the JS I am using so send the form.
$(document).ready(function () {
$(".mail_table_4").on('click', function() {
formid=($(this).attr("alt"));
subform_mail_table_4(formid);
});
});
function subform_mail_table_4(formid)
{
var postData = $("#mail_table_4"+formid).serializeArray();
var formURL='processing/factuur_mail.php';
$.ajax({
url: formURL,
type: "POST",
data: postData,
success: function(data, textStatus, jqXHR) {
$('#modal_mail_table_4'+formid+' .modal-body').html(data);
$("#submit_mail_table_4"+formid).remove();
},
error: function(jqXHR, status, error) {
console.log(status + ": " + error);
}
});
e.preventDefault();
}