AJAX AutoComplete activity indicator

I noticed an undocumented feature with the AutoComplete control of the awesome script.aculo.us JS-library.

To display an activity indicator while the control is building up the list of items matching the input, one can add the option “indicator” together with the ID of the element which is to be displayed during the lookup:

new Ajax.Autocompleter('autocomplete'
, 'autocomplete_choices'
, '{$url}'
,{ indicator:'busy' });

This enhances the usability of the AutoComplete control, since with this option, the users knows when the lookup is finished, which is especially important when there are no matching items found.

This entry was posted in HTML/JS. Bookmark the permalink.

One Response to AJAX AutoComplete activity indicator

  1. Dr Nic says:

    I know you wrote this 10 months ago, but thanks nonetheless! And thanks Mr Google for finding it 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s