post selextbox values to php page in jquery
<p>I am using jquery button click to post all the values in a selectbox to a PHP page, but this code does not seem to work. Can anyone please help?</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(function() {
    $("#btn1").click(function () {
      var arr= new Array; 
       $("#target_select option").each (function () { 
                    // You can push the array on an array 
                    arr.push( $(this).val() ); 
                //alert(  $(this).val()  ); not getting the alert to display too
                    });
      $.post("test.php", { name: arr } );
    });
});

&lt;/script&gt;
</code></pre>

<p>Generate</p>
