Front-end: Setting the event handler

In <head>:
function update_table() { … }

On DOM load:
$('period-select').onchange = update_table;