title: jquery : autocomplete returned Name(s) and ID(s)?
body: <p>Actually I have this html interface;</p>
  
  <pre><code>&lt;input type="text" size="20" name="brandname" /&gt;
  &lt;input type="hidden" name="brandid" value="" /&gt;
  </code></pre>
  
  <p>Actually above there is a hidden input value namely as "<strong>brandid</strong>".</p>
  
  <p>And below is the jquery;</p>
  
  <pre><code>$('#brandname').autocomplete("searchbrandnames.jsp", {
              minChars: 3
          });
  </code></pre>
  
  <p>OK... the ideas here is that;
  Once the user type something into that textfield,
  the jquery will work to have a somekind of autocomplete... like what google does for example.</p>
  
  <p>But here, if we notice from the interface above,
  There is a hidden value there, Green colored. </p>
  
  <p>That hidden value is going to be used as a hidden variable stored.
  That one, that made me question this thread.</p>
  
  <p>What is the best way to obtain <strong>autocomplete into the textfield</strong> and also by <strong>getting the id into the hidden value</strong> as well?
  In above example; let's assume,</p>
  
  <ol>
  <li>we are typing a brand name into the textfield, </li>
  <li>then jquery request into the db for some similar brand names, </li>
  <li>it returned their names with their id; respectively 1 to the textfield and another 1 into the hidden value.</li>
  </ol>
  
  <p>But, as far as I'm working with jquery right now, <strong>many plugins available there</strong>...
  <strong>just returned values into a single place nor many values into many places</strong>. I'm saying places means, referring to the html elements. </p>
  
  <p>Hmmm.... is there any turn out for this case? </p>