18 lines
482 B
JavaScript
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();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}); |