— Or call preventDefault
on the button, while doing the former
— Https://hastebin.com/dojulatepo.js
— This is a snippet I use a lot
— That looks really helpful
— If I used ajax, how does the server send back data? Does it just go back to the handler?
— ajax("/formInterface", "json", myFormData).then(callback);
— callback
gets the response data as a parameter
— Also has built in error handling
— ajax("/formInterface", "json", myFormData).then(callback).catch(callback);