• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Drop-down text selection in jsp/html

Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am trying to create JSP page where I have two drop-downs. There are two-sets of data - First set Categories- Movies, Books, Music and the Second set Genres- Action,Comedy,Romantic.

Now the first dropdown will have all the values. The second drop-down depends upon the first one. For eg: If I select Movies from first dropdown, the second dropdown wil have-Action,Comedy,Romantic (all genres of Movies will be dispalyed). If I select Action from first dropdown, the second dropdown will have- Movies,Books,Music (all categories for Action will be displayed).

How can I create such dynamic dropdowns.

Also based on the values selected in the drop-downs, I should form a query path as Movies/Action or Action/Movies. I need to break up this path and query the database. So how can i know in the backend which is first category or genre.

I do not wish to use String manipulation since the data in the dropdowns can vary.I need some generic solution.

Its little complicated. Please let me know if anyone has a idea on this.Please help.


Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic