aspose file tools*
The moose likes Struts and the fly likes Filter List box depending on the Text Box value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Filter List box depending on the Text Box value" Watch "Filter List box depending on the Text Box value" New topic
Author

Filter List box depending on the Text Box value

Chinni Bujji
Ranch Hand

Joined: Jan 31, 2007
Posts: 60
Hi,

I have a list box with some values
when i enter a single character in the text box the list box should get filtered and then give me the list with that starting letters

ex: F
list is Four
Five
Fine
Future

like this

any suggestions or sample code will be of great help

thank you
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The term normally used for this type of control is a "typeahead" list or control, and you need to use AJAX to make it work. My suggestion would be to find a JavaScript library that has a pre-built typeahead control that you can just plug into by providing the server-side portion. Just Google "AJAX typeahead" and you'll see lots of alternatives. The one I've used is scriptaculo.us.


Merrill
Consultant, Sima Solutions
 
wood burning stoves
 
subject: Filter List box depending on the Text Box value