This repository has been archived on 2025-12-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
FunctionProject/scripts/execute-function/feedbackForm_DOM.js

18 lines
447 B
JavaScript

$(function () {
$('#formLinkShortener').submit((event) => {
event.preventDefault();
const postdata = $('#formLinkShortener').serialize();
$.ajax({
type: 'POST',
url: '../../php/shortenLink.php',
data: postdata,
success: (text) => {
try {
$(".results").html(JSON.parse(text).message);
} catch (error) {
$(".results").html("URL invalide.");
}
}
});
});
});