• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting values in Select from db

 
adeeb alexander
Ranch Hand
Posts: 268
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64175
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search for the terms "cascading dropdowns" or "dependent dropdowns". There will be many examples and approaches.
 
adeeb alexander
Ranch Hand
Posts: 268
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64175
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic