A while ago I converted the select boxes for one of our web applications to use an AJAX driven, autocomplete input that grabs suggestions from the database. I used jQuery and the FlexBox plugin as described in my post comparing the functionality of jQuery and MooTools. Since then I have had requests to change most of the other applications to use this technology; the users absolutely love it.
For our internal web apps, one of the most common fields is the employee select field. We are using single sign-on, so we know who is entering the data, but we need to also present a list of other users as well. Many of these applications are used at multiple facilities, and normally a user will only want to see information relevant to that facility. Which is good since it allows for the presentation of a select list filtered by location. Without this we would have to generate select drop-downs containing all users from all facilities, which is thousands of users. But, since the Great Recesion, more people are working in cross-facility roles and the need for a complete list has grown. The solution to this problem has been the AJAX driven autocomplete inputs.
I have been reusing the same snippet of code for multiple appliations, and decided to share it here as well. It can be found after the jump.
In the head of the HTML document: