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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Filter List box depending on the Text Box value
 
Similar Threads
how do I validate a listbox
Strange - Page Submits!!!
Best way to create a combo-box (editable selectBox)?
Javascript Parameter
dynamic row generation in struts ?