function handleCommentSubmitClick(PostID) {
console.log("PostID: ", PostID);
const comment = $("textarea[name='post-comment']").val();
$.ajax({
type: "POST",
url: "/PostCommentInput",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: {
comment: comment
},
success: function (data, status) {
console.log(data);
},
error: function (xhr, status, error) {
console.error("AJAX error: " + status + ' ' + error);
}
});
}
function handleCommentSubmitClick(PostID) {
console.log("PostID: ", PostID);
const comment = $("textarea[name='post-comment']").val();
$.ajax({
type: "POST",
url: "/PostCommentInput",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: {
comment: comment
},
success: function (data, status) {
console.log(data);
},
error: function (xhr, status, error) {
console.error("AJAX error: " + status + ' ' + error);
}
});
}