• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Drop-down text selection in jsp/html

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

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.

Thanks,

swati
 
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic