Added an onchange that works without having to click out of the element.