This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
alumni/app/scripts/main.js
T

31 lines
1.1 KiB
JavaScript

'use strict';
console.log('\'Allo \'Allo!');
$(function() {
$('form').on('submit', function() {
event.preventDefault();
// Display a spinner
$('.interest').append('<div id="floatingCirclesG"><div class="f_circleG" id="frotateG_01"></div><div class="f_circleG" id="frotateG_02"></div><div class="f_circleG" id="frotateG_03"></div><div class="f_circleG" id="frotateG_04"></div><div class="f_circleG" id="frotateG_05"></div><div class="f_circleG" id="frotateG_06"></div><div class="f_circleG" id="frotateG_07"></div><div class="f_circleG" id="frotateG_08"></div></div>');
// 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('<h1 style="text-align:center;">Takk</h1>').append(data);
}
);
});
});