Error when using jquery redirect href
<pre><code>&lt;form class="frmSearch" id="myform" method="post" action="" &gt;
    &lt;input type="radio" checked="checked" value="0" name="selection" class="type" /&gt;
    &lt;label&gt;Type0&lt;/label&gt;
    &lt;input type="radio" value="1" name="selection" class="type" /&gt;
    &lt;label&gt;Type1&lt;/label&gt;
    &lt;input class="submit" type="submit" name="submit" value="search" /&gt;
&lt;/form&gt;
</code></pre>

<p>and in jquery i use:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
   // Submit form
   $('.submit').click(function(){
        var type = $('.type').val();
        document.myform.action = "index.php?type="+id;
   });  
});
</code></pre>

<p>jquery error can not get type and redirect, how to fix it ?</p>
