Getting the select box option value in a form if the submit button of a particular form is clicked
<p>I have a couple of forms on one page without a form name.</p>

<p>Each form has a select box and a submit button. Whenever the button is clicked I need to get the value of the select box for the particular form where the button was clicked</p>

<p>form example</p>

<pre><code>&lt;form&gt;
&lt;select class="boxes" name="select3"&gt;
   &lt;option value="5"&gt;5&lt;/option&gt;
&lt;/select&gt;
&lt;input type="submit" align="right" class="btn" value="Add to basket" name="submit"&gt;
&lt;/form&gt;
</code></pre>

<p><strong>My code thus far</strong></p>

<pre><code>$(".btn").click(function(){
                       if($(this).val() == 'Add to basket'){
                           var value = $('select[value="select3"] option:selected').val();
                           alert(value);
                           return false;
                       }
                    });
</code></pre>

<p>All forms look the same just with a couple of more fields and different values in the select box.</p>
