TheOnly92
TheOnly92

Reputation: 1763

Alternative to HTML Dropdown

I'm currently having a really long list of university names that are not sorted in alphabetical order. What the user needs to do is quickly find the university's name he/she wants, however the user may or may not know the specific university name, it is requested that the user type one or two keywords and the required university name should appear. Obviously, dropdown wouldn't work out well, what can I do?

EDIT: The user may not know how the university is named, for example the user wants Tokyo University, but in the list, is is "The University of Tokyo", so how do I do so that if the user types in Tokyo University, it will still display "The University of Tokyo" as well (of course, there will be some other university names listed as well...).

Upvotes: 0

Views: 501

Answers (2)

casablanca
casablanca

Reputation: 70701

If you're okay with using jQuery, the autocomplete plugin does exactly what you want. You can configure it to use a URL to fetch names as the user types. If the university names are stored in a database, you can write a script to look up all matching names and return them.

Upvotes: 3

Dean Thomas
Dean Thomas

Reputation: 1116

Autocomplete? Similar to google's suggestion stuff? Simple with a bit of Ajax and jQuery.

Upvotes: 4

Related Questions