COURSE #18 (anglais)
generate and ajax
<script>
$("form" ).on("submit", function( event ) {
event.preventDefault();
let data = $(this).serialize();
$.ajax({
url : "/save_form.sn",
dataType: 'json',
data : data
}).done(function(response) {
console.log(response);
$('#table').html(response.output);
});
});
</script>