JS to change dome contents after a different selection changes value