• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Joe Ess
  • salvin francis
  • fred rosenberger

A question in dynamic dropdown box

Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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,

Posts: 67340
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!