title: Show form fields based on selected option
body: <p>I'm trying to show a different form field based on an option id in my form (not the value), but I get the same/double results no matter what is selected. </p>
  
  <p>When I Choose <strong><em>Rent</em></strong> I get:</p>
  
  <ul>
  <li>rent selected</li>
  <li>own selected</li>
  </ul>
  
  <p>When I Choose <strong><em>Own</em></strong> I get:</p>
  
  <ul>
  <li>rent selected</li>
  <li>own selected</li>
  </ul>
  
  <p>What do I need to do to fix this?</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 rentown(nameSelect)
  {
      if(nameSelect){
          rentcheck = document.getElementById("rentcheck").value;
          //alert(admOptionValue);
          if(rentcheck == document.getElementById("rentcheck").value){
              document.getElementById("rent").style.display = "block";
          }
          else{
              document.getElementById("rent").style.display = "none";
          }
      }
  
      
          if(nameSelect){
          owncheck = document.getElementById("owncheck").value;
          
          if(owncheck == document.getElementById("owncheck").value){
              document.getElementById("own").style.display = "block";
          }
          else{
              document.getElementById("own").style.display = "none";
          }
      }
  
      
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select onchange="rentown(this);"&gt;
  &lt;option selected="true" disabled="disabled"&gt;Please Choose&lt;/option&gt; 
  &lt;option id="rentcheck" value="0"&gt;Rent&lt;/option&gt;
  &lt;option id="owncheck" value="0"&gt;Own&lt;/option&gt;
  &lt;/select&gt;
  
  
  &lt;div id="rent" style="display:none;"&gt;
  rent selected
   &lt;/div&gt;
   
   
   &lt;div id="own" style="display:none;"&gt;
  own selected
   &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <hr>