Added the templates.

This commit is contained in:
Batuhan Berk Başoğlu 2021-03-10 14:01:44 -05:00
commit b40c29cced
17 changed files with 946 additions and 0 deletions

23
public/assets/action.js Normal file
View file

@ -0,0 +1,23 @@
// jQuery that will "listen" to the html niceSurvey.html
$(document).ready(function(){
$('form').on('submit', function(){
// var item = $('form input');
// console.log(item.serializeArray());
$.ajax({
type: 'POST',
url: '/niceSurvey',
data: $(this).serializeArray(),
success: function(data){
// do something with the data via front-end framework
// Make the submit button red, disabled and saying Thank you
$("#bb").css("background-color", "red");
$("#bb").prop("disabled", "true");
$("#bb").text("Thank you!");
}
});
return false;
});
});