'use strict';
console.log('\'Allo \'Allo!');
$(function() {
$('form').on('submit', function() {
event.preventDefault();
// Display a spinner
$('.interest').append('
');
// Save and load
var toPost = {
name: $('#name').val(),
email: $('#email').val(),
division: $('#division').val(),
years: $('#years').val()
};
console.log(toPost);
$.post(
'http://alumni.studentersamfundet.no/async.php',
toPost,
function(data){
console.log('Successfully posted sumtin.');
console.log(data);
$('.interest').html('Takk
').append(data);
}
);
});
});