title: Open HTML select dropdown programmatically
body: <p>I am trying to open programmatically a select box (html dropdown/select box, notfile picker) in javascript using this code</p>
  
  <p><a href="https://jsfiddle.net/Dj7ak/13/" rel="nofollow">https://jsfiddle.net/Dj7ak/13/</a></p>
  
  <pre><code>function openSelect() {
  
       var element = document.getElementById("s")
         var worked = false;
       if (document.createEvent) { // all browsers
           var e = document.createEvent("MouseEvents");
           e.initMouseEvent("mousedown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  
  
           worked = element.dispatchEvent(e);
  
       } else if (element.fireEvent) { // ie
           worked = element.fireEvent("onmousedown");
       }
  
   }
  </code></pre>
  
  <p>but only seems to work in chrome. Not in ie 11 not in firefox.</p>
  
  <p>Anyone any ideas?</p>
  
  <p>Thanks</p>