Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Search function  RSS feed

 
phani kon
Ranch Hand
Posts: 251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a test box with a search button. when I click the search button, it should search a value in the drop down list.

What is the best way to do this?
 
C Broussard
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we probably need more information, but at a high level if you want to do it client side, just use some javascript and scroll through you option list doing an indexOf of the string value to the text value of the option list. if you're doing it server side you'll need to reload your option list so it's in memory, and iterate over the collection doing some sort of indexOf on that. if we had more information about what you're tryin to accomplish we could potentially point to you lucene for a more complete solution.


hope that helps,

www.binaryfrost.com
 
phani kon
Ranch Hand
Posts: 251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a text box for search and go button, If I say for example 'Corporate' and click GO. It should go and search for that value in the dropdownlist.

Could anyone give me similar examples code?

Thanks in advance
 
phani kon
Ranch Hand
Posts: 251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone give me some examples? How to do this?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!