• Post Reply Bookmark Topic Watch Topic
  • New Topic

A question in dynamic dropdown box

 
Preethinj Math
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a question in jsp.

I am designing a screen where subcategories can be
selected depending on the category selected in a dynamic dropdown box.

For ex. the states are displayed only when you
select a country and cities are displayed depending
on the state selected.

I found similar code on internet but, in all those
examples all the categories and subcategories are
predefined in an array.

My question is can I select the categories and
subcategories from database instead of writing all
of them in an array?

If we can do that do you know how it works?

Need help in this,

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would either need to submit the page back to the server and redraw it with the new data, or use a technology such as Ajax to make a behind-the-scenes request.

Search the HTML forum for previous topics -- this gets asked a lot.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!