title: how to "resubmit" drop-down selection with javascript?
body: <p>I am trying to use a headless browser (<a href="https://firefox-source-docs.mozilla.org/testing/marionette/index.html" rel="nofollow noreferrer">Firefox Marionette</a>) to drive a drop-down selection process on a website I do not control. The setup is as follows: there's</p>
  <ul>
  <li>a drop-down menu where I can make a selection</li>
  <li>a second drop-down menu that reloads when I click my selection in the first one, exposing more options than it initially displays.</li>
  </ul>
  <p>Clicking in a browser works fine, but if I try to do this in a console, the second menu does not reload:</p>
  <pre class="lang-js prettyprint-override"><code>var sel1 = document.getElementById(&quot;1stmenu&quot;)
  sel1.value=&quot;my selection&quot;
  sel1.selectedIndex=1
  </code></pre>
  <p>This changes the first drop-down menu appropriately, but does not trigger the 2nd menu's reload; the latter remains blank, displaying no options.</p>