aspose file tools*
The moose likes Java in General and the fly likes Drop-down text selection in jsp/html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Drop-down text selection in jsp/html" Watch "Drop-down text selection in jsp/html" New topic
Author

Drop-down text selection in jsp/html

swati mppy
Greenhorn

Joined: Jul 03, 2011
Posts: 7
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Drop-down text selection in jsp/html