JS loading one dropdown based on another doesn't work first time, only subsequent times
<p>I have two dropdowns, defined in Spring with select tags (using id). The first one is given a set of values, and also has a 'dummy' value of "Select..." as its first value; when there is no value selected, this dummy value indicates to the user that he is supposed to select something.</p>

<p>When the dialog containing these dropdowns appears, there is code to get allowed values and fill the first dropdown with them, then select the currently-selected value from that list. That works fine. I also execute the onchange() function in that dropdown programmatically, so it can use the Ajax call to fill up values in the second one. Later on in the code I select a value from the second one.</p>

<p>When the user selects a value in the first one, I execute that ajax call to get the values for the second one and fill it up. It works fine UNLESS the first selection in the first box is the dummy value. In that case, the second dropdown fails to change appearance. I can step through in the (Chrome) debugger and see that it is executing the Ajax call, getting back no values, and calling either the jquery .html() function on the jquery reference to the object, or setting .innerHTML to an empty string (i.e., I've tried it both ways). It executes, but the dropdown doesn't change appearance at all.</p>

<p>After I select something else first, it works fine - on selecting the dummy value in the first dropdown, the second one is set to be empty. After that I can select the dummy value or any other value, and the second dropdown fills correctly.</p>

<p>What could be different about the first time I choose something from the first dropdown?</p>