get the value of radio button and then proceed to autosuggest
<p>hello
  i have developed an autosuggest in my site and it works fine and now the problem is now an user selects an radio button the autosuggest should go to corresponding suggestion </p>

<pre><code>$().ready(function() {

$("#q").autocomplete('?h=sugg&amp;a='+$("#rad").val(), {
    width:350,
    max: 10,
    highlight: false,
    scroll: true,
    scrollHeight: 300,
    selectFirst: false,
    formatResult: function(data, value) {
        return value.split(".")[0];
    }

});
&lt;input name="q"   id="q" autocomplete="off"  /&gt;
      &lt;input type="radio" name="rad" value="radio" id="rad_0" checked="checked"  /&gt;
      Radio&lt;/label&gt;
    &lt;br /&gt;
    &lt;label&gt;
      &lt;input type="radio" name="rad" value="radio1" id="rad_1" /&gt;
      Radio&lt;/label&gt;
</code></pre>

<p>the thing is it always selects the default value it does not change if i select the other please tell me how can i do that...</p>
