Programmatically populate dropdown with Javascript

I have two dropdowns, one where you select a ‘market’ which should then add the child items to the second dropdown, I know I can do this with conditionals, but my dataset is always changing and so I need to be able to change input options on the fly. I have most of the Javascript done, but I need to know a good way of populating an input with Javascript. At the moment I am populating the hidden select input and the visible .chose-results div.

© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.