title: ajax method using chosen autocomplete
body: <p>I am trying to modify this select for autocomplete using chose or the autocomplete itself, but without success, below my implementations</p>
  <ul>
  <li>HTML</li>
  </ul>
  <p>Each action of this chckbox populates the select with the return codes</p>
  <pre><code>&lt;div class=&quot;form-group&quot;&gt;
                  &lt;input type=&quot;checkbox&quot; name=&quot;resale&quot; id=&quot;resale&quot; value=&quot;1&quot; data-toggle=&quot;toggle&quot; 
                      data-on=&quot;Yes&quot; data-off=&quot;No&quot; onchange=&quot;getProcessesRosale()&quot; /&gt;
              &lt;/div&gt;
  
      &lt;select name=&quot;number_proc&quot; id=&quot;number_proc&quot; class=&quot;form-control&quot; onchange=&quot;getProducts()&quot;&gt; &lt;/select&gt;
  </code></pre>
  <p>AJAX/ JS</p>
  <pre><code>function getProcessesRosale() {
          $.ajax({
              url: './getProcessesRosale',
              dataType: 'json',
              type: 'get',
              data: {
                  'client': $('#cgc').val()
              },
              success: function(data) {
                      $('#number_proc').find('option').eq(0).text('');
                      var htm = '';
                      $('#number_proc').find('.forpgto').remove();
                      for (var i in data) {
                          if(data[i].saldo != &quot;0&quot;){
                              alert(data[i].cod_devolution);
                              htm += `&lt;option value=&quot;`+ data[i].cod_devolution+`&quot; class=&quot;forpgto&quot;&gt;`+ data[i].cod_devolution+ `&lt;/option&gt;`;
                          }
                      }
                  
                  $('#number_proc').append(htm);
              },
              error: function(data) {
  
              }
          });
      }
  </code></pre>
  <p>Due to these methods, I select the population, but now there has been a change and we need to make a sleect that allows research, but I am trying to import and implement the chosen jquery and autocomplete without success, someone could help with an example and suggestions on how to solve it. Thanks in advance for your help</p>