Could you extract this "re-setting the options for a select-element" into a function? Preferably with a small code-comment explaining the peculiar (but necessary) syntax.