aspose file tools*
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
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: 61648
    
  67

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: 61648
    
  67

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?
 
jQuery in Action, 2nd edition
 
subject: Getting values in Select from db