Labs

Facebook Style Suggest List

A few projects that I'm working on where using select lists that were being populated with hundreds of options and they were just
becoming overwhelming. To rectify the situation, I developed this clone of Facebook's "Compose To" functionality.

Try typing the name of a character from NBC's "The Office" or ABC's "Alias" in the field below. If you have
javascript enabled, you should see some options. Click an option to select it.

To:

Download

Version 1.0 - This is the initial release. I expect to make a few more changes in the next few days as well
as adding keyboard navigation, search highlighting, and request caching. Download version 1.0 now.

To use SearchList, simply include all the dependencies mentioned above plus the facebook theme files. Add a div with a
class of "searchlist_container" and an id field Then, do something
like:
Event.observe(window, 'load', win_load);
function win_load()
{
SearchListFactory.createList({
area: id_property_of_div,
url: url_to_ajax_script
});
}
That's the bare minimum. That will send a request via get to your script where the "q" parameter is the query typed
into the search field.