- $action->script('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.pack.js');
- $action->script('plugins/Autocomplete/Autocomplete.js');
+ $action->element('span', array('id' => 'autocomplete-api',
+ 'data-url' => common_local_url('autocomplete')));
+ $action->script($this->path('jquery-autocomplete/jquery.autocomplete.pack.js'));
+ $action->script($this->path('Autocomplete.js'));