title: Submitting dropdown form and getting variables (jquery/javascript)
body: <p>I have two dropdown boxes in one form - only one option can be selected from each box. On pressing the submit button of the form, I want to store the values of the options selected in two different variables.</p>
  
  <p>Here is my form:</p>
  
  <pre><code>&lt;form id="form1" method="post"&gt;            
      &lt;select id="slt_country" name="country"&gt; 
          &lt;option value="EN" &gt;England&lt;/option&gt;
          &lt;option value="SC" &gt;Scotland&lt;/option&gt;
          &lt;option value="IR" &gt;Ireland&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;select id="slt_zoom" name="zoom"&gt; 
          &lt;option value="IC" &gt;close&lt;/option&gt;
          &lt;option value="SC" &gt;far&lt;/option&gt;
      &lt;/select&gt;
      &lt;input type="submit" Value="submit" &gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And this is what I have come up with so far to retrieve the form:</p>
  
  <pre><code>$("#form1").submit (function(){
      var ctry=  $("select#slt_country").val();
      var zm=  $("select#slt_zoom").val();
  });
  </code></pre>
  
  <p>I've been struggling for too long now with something that should be so simple, so decided to ask for help.</p>