title: html onClick condition Link
body: <p>SO basically im trying to create a button on a html webpage that uses or checks the values from two drop down lists and relative to that it will link to the appropriate page.
  But the IF statements dont seem to work...</p>
  
  <p>i tried using regular href Links but this didnt end well, such as <a href="https://stackoverflow.com/questions/5138215/when-to-use-onclick-in-html">When to use onclick in HTML?</a></p>
  
  <p>here is my code:</p>
  
  <pre><code>&lt;select name="Module"&gt;
  &lt;option value="Module 10"&gt;Module 10&lt;/option&gt;
  &lt;option value="Module 11"&gt;Module 11&lt;/option&gt;
  &lt;option value="Module 20"&gt;Module 20&lt;/option&gt;
  &lt;option value="Module 60"&gt;Module 60&lt;/option&gt;
  &lt;option value="Module 70"&gt;Module 70&lt;/option&gt;
  &lt;option value="Module 85"&gt;Module 85&lt;/option&gt;
  &lt;/select&gt;
  
  
  &lt;select name="Sector"&gt;
  &lt;option value="Sector1"&gt;Sector1&lt;/option&gt;
  &lt;option value="Sector2"&gt;Sector2&lt;/option&gt;
  &lt;option value="Sector3"&gt;Sector3&lt;/option&gt;
  &lt;option value="Sector4"&gt;Sector4&lt;/option&gt;
  &lt;/select&gt;
  
  
  &lt;FORM&gt; 
  &lt;INPUT type="button" value="OK" 
  onClick="if (( Module=='Module 10') &amp;&amp; (Sector=='Sector1)) {location.href='M10_S1.html'}"&gt; 
  &lt;/FORM&gt; 
  </code></pre>