selectbox improvement

This will modify the html each time it loops through the options.
Should be done only once. And I guess you can also use [`join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join)?