This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/scripts/execute-function/feedbackForm_DOM.js
2020-01-20 22:01:48 +01:00

18 lines
482 B
JavaScript

$(function () {
$('#feedbackForm').submit((e) => {
e.preventDefault();
const postdata = $('#feedbackForm').serialize();
$.ajax({
type: 'POST',
url: '../../php/feedbackForm.php',
data: postdata,
success: (response) => {
const result = JSON.parse(response);
$(".results").html(result.message);
if(result.isSuccess) {
$("#feedbackForm")[0].reset();
}
}
});
});
});