Javascript

Assigning onChange Events in Javascript

I wasted a small portion of the last few hours of work today with this issue and the docs everywhere were unclear. So I am going to explain really quick what happened in hopes that others don’t have to waste time with it either.
The correct code is:

var e = document.getElementById(’some_element’)
e.onchange = some_func
function some_func() { alert(’Oh [...]