Files
WebDB/website/public/js/post.js
2017-01-31 13:56:34 +01:00

18 lines
434 B
JavaScript

function postComment(buttonValue) {
formData = $("#newcommentform").serializeArray();
formData.push({name: "button", value: buttonValue});
$.post(
"API/postComment.php",
formData
);
$("#newcomment").val("");
//reload post
$.get(
"API/loadPost.php",
$("#newcommentform").serialize()
).done(function (data) {
$('#modal-response').html(fancyText(data));
});
}