title: onclick hypertext link display select option
body: <p>I want the script to load select option when onClick hypertext link
  I am using the onclick handler to load a select option after clicking hypertext link, but nothing happens.
  You can see a sample of my code below:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function toggleTables(which) {
  
    if (which == "greenhouse") {
      document.getElementById('greenhouseselect').style.display = "block";
      document.getElementById('nethouseselect').style.display = "none";
      document.getElementById('sprinklerselect').style.display = "none";
  
    }
    if (which == "nethouse") {
      document.getElementById('greenhouseselect').style.display = "none";
      document.getElementById('nethouseselect').style.display = "block";
      document.getElementById('sprinklerselect').style.display = "none";
  
    }
    if (which == "sprinkler") {
      document.getElementById('greenhouseselect').style.display = "none";
      document.getElementById('nethouseselect').style.display = "none";
      document.getElementById('sprinklerselect').style.display = "block";
  
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="row"&gt;
    &lt;input type="checkbox" name="" value="greenhouse"&gt;&lt;a href="#"&gt;Green House&lt;/a&gt;
    &lt;input type="checkbox" name="" value="nethouse"&gt;&lt;a href="#"&gt;Net House&lt;/a&gt;
    &lt;input type="checkbox" name="" value="sprinkler"&gt;&lt;a href="#"&gt;Sprinkler&lt;/a&gt;
  &lt;/div&gt;&lt;br&gt;
  
  &lt;div class="row"&gt;
    &lt;div&gt;
      &lt;select id="greenhouseselect"&gt;
        &lt;option value="310000"&gt;8 x 30 @ 310,000Ksh - Locally Fabricated&lt;/option&gt;
      &lt;/select&gt;
    &lt;/div&gt;&lt;br&gt;
    &lt;div&gt;
      &lt;select id="nethouseselect"&gt;
        &lt;option value="170000"&gt; 8 x 15 @ 170,000Ksh - Locally Fabricated&lt;/option&gt;
      &lt;/select&gt;
    &lt;/div&gt;&lt;br&gt;
    &lt;div&gt;
      &lt;select id="sprinklerselect"&gt;
        &lt;option value="50000"&gt;Movable Systems 1 Acre @ 50,000 &lt;/option&gt;
      &lt;/select&gt;
    &lt;/div&gt;&lt;br&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>