title: How to click on the dropdown option from another link
body: <p>This is interesting.
  I'm working on a Wordpress site and there are 2 dropdowns:
  1- select a maker
  2 - select a model</p>
  <p>If I use the mouse to select the maker, the models are filtered according to the maker.
  That's working fine.</p>
  <p>I have been requested to auto fill the dropdown with the maker, which I already did with the following code:</p>
  <p>On the menu, I have an onclick(spage) action on the link which will call the function below.
  The console log is showing the right values.</p>
  <pre><code>function spage() {
     var valueToFind= '1';
     var option;
  
     var dd = document.getElementById('device_manufacturer');
        for (var i = 0; i &lt; dd.options.length; i++) {
         if (dd.options[i].value === valueToFind) {
             dd.selectedIndex = i;
             var opt = dd.options[dd.selectedIndex];
             console.log( opt.value );
             console.log(i);
          break;
         }
       }                    
  }
  </code></pre>
  <p>With this function the maker is filled, but is not filtering the second dropdown with the models.</p>
  <p>So, the maker option needs to be clicked and not just found and display.</p>
  <p>I'm struggling to make that work and any help will be great.</p>