wood burning stoves 2.0*
The moose likes JSP and the fly likes Getting values in Select from db Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Getting values in Select from db" Watch "Getting values in Select from db" New topic
Author

Getting values in Select from db

adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
hi,
I have a cloumn with n value i.e many rows. I want to get the values in the select option list on selecting an option from other select. How can i achieve this somebody please help.
Thanks.
adeeb
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Search for the terms "cascading dropdowns" or "dependent dropdowns". There will be many examples and approaches.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
Thanks for replying bear. But is there a way to load the values in the dropdown from database in jsp, if so how please help. I googled but i dint get the appropriate answer.
If you can give a simple example, it would be great help.





Thanks
adeeb.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Unless you want to reload the page every time a selection is made, JSP is not going to be useful for this purpose. This type of activity is usually accomplished via Ajax.

Which approach do you wish to pursue?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting values in Select from db
 
Similar Threads
Can AJAX helps me to do that
get data from database
Fetching values from database and populating it in drop down and text fields
creating dymic optionvalues in select box from arraylist values in jsp
Populating a dependant select list without reloading the page