File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Multiselect List box Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Multiselect List box " Watch "Multiselect List box " New topic
Author

Multiselect List box

Nila dhan
Ranch Hand

Joined: Sep 15, 2005
Posts: 160
There is a requirement that I have to work on.
There is one multiselect list box for products. Each product might have different models.
On multiple selection of the products, i have to populate the models dropdown.
Is there any way to implement this.


Thanks in advance

Nilesh Miskin
Ranch Hand

Joined: Jun 17, 2010
Posts: 44
An elegant way to solve your problem would be to use Ajax. After selecting the products, you can call a servlet asynchronously which holds the logic that simply returns the list of models for those products. Along with the html tags, the formatted result would display a models dropdown for selected products.


Nilesh Miskin
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

Moved to the HTML forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

If you want to use jQuery to do your Ajax for you (highly recommended) see the sample code for chapter 8 of jQuery in Action (2nd Ed). Loading cascading dropdowns dynamically is as easy as pie.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Multiselect List box
 
Similar Threads
How to write getter/setter method for multiselect select box?
need an index of latest item choosen with ListBox
Need help for trinidad components
Multiselect list box
jQuery multiselect dropdown fails to collapse