getting autocomplete working I honestly did, what this and this tutorial told me, but somehow my autocomplete textfields still fire an ajax error. but to be more specific: the ajax error gives a 200 http response and a status OK, but no answer-text.

my setup is:

$form['field_new_verein_location_'.$i] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('&lt;a id="ds_region_new_verein_'.$field_id.'" style="color:black;text-decoration:none;"&gt;Neuer Verein Ort&lt;/a&gt;'),
    '#default_value' =&gt; '',
    '#size' =&gt; 60,
    '#maxlength' =&gt; 128,
    '#required' =&gt; TRUE,
    '#description' =&gt; t('description'),
    '#autocomplete_path' =&gt; 'dsregion/autocomplete'
);

function ds_regions_menu(){
    $items['dsregion/autocomplete']=array(
      'title' =&gt; 'location auto complete',
      'page callback' =&gt; '_dsregion/autocomplete',
      'access arguments' =&gt; array('access region autocomplete'),
      'type' =&gt; MENU_CALLBACK
    );
    return $items;
}

function _dsregion_autocomplete($string) {
    $matches = array();
    $result = db_select('ds_plz_ort','o')
      -&gt;fields('o',array('ort'))
      -&gt;condition('ort','%'.db_like($string).'%','LIKE')
      -&gt;range(0,10)
      -&gt;execute()
      -&gt;fetchAllKeyed();

    foreach($result as $row){
      $matches[$row-&gt;ort]=check_plain($row-&gt;ort);
    }
  drupal_json_output($matches);
}
You have a slight error in your page callback property for the menu item. You've got a string resembling a path in there instead of the name of the callback function.

Just change

'page callback' =&gt; '_dsregion/autocomplete'


to

'page callback' =&gt; '_dsregion_autocomplete'


Then clear Drupal's caches and you should be good to go.