title: How to filter autocomplete results in text boxes
body: <p>I have created autocomplete ajax search for a web site which auto complete organization names and addresses seperatly, 
  but i want it to validate , when someone search organization name,  address text should give auto complete results only for
  matching search organization name. </p>
  
  <p>can anyone please advice me </p>
  
  <p>organization address ajax : </p>
  
  <pre><code>$addresso=$_GET["term"];
  $query=mysql_query("SELECT * FROM sltdb_cddir_content where fulladdress like '%".$addresso."%' AND categories_id=80  order by fulladdress ASC ");
  $json=array();
  while($display=mysql_fetch_array($query)){
  $json[]=array(
  'value'=&gt; $display["fulladdress"],
   'label'=&gt;$display["fulladdress"]
   );
   }
  </code></pre>
  
  <p><strong>organization name ajax</strong></p>
  
  <pre><code> $searcho=$_GET["term"];
   $query=mysql_query("SELECT * FROM sltdb_cddir_content where title like '%".$searcho."%'AND categories_id=80  ");
   $json=array();
   while($display=mysql_fetch_array($query)){
   $json[]=array(
   'label'=&gt; $display['title'],
   'value' =&gt; $display['title'],
    );
    }
  </code></pre>
  
  <p>autocomplete jquery :</p>
  
  <pre><code>  jQuery.noConflict();
            jQuery(function(){
                jQuery("#addresso").autocomplete({
                    source:'&lt;?php echo JURI::root().'modules/mod_jomdirectory_search/tmpl/gov-address.php'; ?&gt;',
  
                    minLength:1
                });
            });
  
            jQuery.noConflict();
            jQuery(function(){
                jQuery("#searcho").autocomplete({
                    source:'&lt;?php echo JURI::root().'modules/mod_jomdirectory_search/tmpl/gov.php'; ?&gt;',
  
                    minLength:1
                });
            });
  </code></pre>
  
  <p>form : </p>
  
  <pre><code>&lt;input id="searchc" class="ui-autocomplete-input" type="text" name="search" "&gt;&lt;/input&gt;
  </code></pre>
  
  <p></p>
  
  <p>NOTE </p>
  
  <p>what i exactly want is , when someone select a value from organization name text box, address text box should load the auto complete resuls which related to that organizatoin name. please advice</p>