File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Type Ahead in Drop Down Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Type Ahead in Drop Down" Watch "Type Ahead in Drop Down" New topic

Type Ahead in Drop Down

Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336

I am developing an application where I need to Search a value from a drop down list by implementing a type ahead. I would wannt to implement a type-ahead similar to the type-ahead we use in the address bar of our IE or firefox browser. Do I need to use AJAX ? Please let me know.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

Ajax will let you go back to the server to get more information. But I'm not sure that's going to help you. I'm not exactly sure what you mean by "type ahead" within the context of drop-down select elements.

[Asking smart questions] [About Bear] [Books by Bear]
Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
Well I need client side scripting. So i guess I wouldn't be using AJAX.

By type ahead I mean an implementation as we see in our MS outlook where we have to search for a contact. For eg. I have a drop down list in my drop down List (from <input type="dropdown"/> and if my list is 100 items long, I dont want to scroll down the entire list to find a name. I would prefer to type the name in the Drop down menu(similar to the way we type in our browser and get a auto-type ahead) and that would pull up the name from the list.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
If you have to hit the server to get the values then you need to use Ajax. Plenty of script out there, search the net or get my book.

If you already have all of the values then there is no need for Ajax you can look at where there is a long discussion on it.

Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
Hi Eric,

I checked this link and I think its close to what I am looking for.

That should solve the problem.

Thanks a heap.
I agree. Here's the link:
subject: Type Ahead in Drop Down
It's not a secret anymore!