How to post the value of all radio groups on page in jquery?
<p>I trying to make a simple image gallery, where I have several radio button groups to filter the search results.(I am pretty new to jquery, and started learning it today, so please be patient.)</p>

<p>1)I have tried this code to create an associative array, but the array comes up as blank. Any ideas?</p>

<pre><code>$('input:radio:checked').each(function(){
        searchCriteria[this.name]=this.value;
    });
</code></pre>

<p>2)Along with that, can someone show me how to post the data to a php page( using jQuery ajax), using POST method?
Will this work?</p>

<pre><code>$.post('testResults.php',searchCriteria,displayResult);
</code></pre>

<p>To every one trying to help:
The following code seems to work</p>

<pre><code>    $('input:radio:checked').each(function(){
        searchCriteria.push(new addValue(this.name,this.value));
        //searchCriteria['this.name']=this.value;
    });

function addValue(a,b)
{
    this.key=a;
    this.val=b;
};
</code></pre>

<p>But that creates an object array.....why am I having problems creating the associative array?</p>
