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

18 lines
482 B
JavaScript
Raw Normal View History

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