How to auto submit the suggested value from the autocomplete jQuery script?
<p>Below there is my code that shows a suggested list of words (rpc.php) when the user type 3 and more letters in the textbox. My question is how can I edit it, that when the user select a suggested word, the form is submitted?</p>

<p>Now when I click on a suggested word it places it in the textbox.</p>

<p>I thought of two possible ways.</p>

<ol>
<li>The form is auto submitted when the user selects a suggested word.</li>
<li><p>The suggested word is a link that gets you correctly to the results page. (I can set the desired link through the rpc.php).</p>

<pre><code>&lt;script type="text/javascript"&gt;
$().ready(function() {

    $("#s").autocomplete("rpc.php", {
        width: 250,
        selectFirst: false,
        minChars: 3,
        scroll:true,
        matchContains: true,
        scrollHeight: 250
    });

});
&lt;/script&gt;
</code></pre></li>
</ol>

<p>this is my form</p>

<pre><code>&lt;form method="get" action=".php"&gt;
&lt;input type="text" name="s" id="s" class="inputsearch"&gt;
&lt;input id="searchform" type="submit"&gt;
&lt;/form&gt;
</code></pre>
