File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Combo Box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Combo Box" Watch "Combo Box" New topic

Combo Box

Gaurav x Jain
Ranch Hand

Joined: Feb 01, 2011
Posts: 39
Hi Friends

I want to add data in combo box in my JSP page as per selection done in another combo box. For example:

1st combo box Country
2nd combo box languages

when I select country in first combo box it will load related languages (one or many) in second combo box.

Please help
Mahendra Suda

Joined: Apr 22, 2011
Posts: 18

You can use the Ajax for your requirement, there is lot of library available for ajax.

you can refer ajax jsp tag library also.

see the 'Select' example in this page
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62126

First, please use correct terminology... there's no such thing as a "combo box" in HTML. Please read HtmlHasNoComboBox

Second, this is nothing you would do with Servlets, or even JSP. It needs JavaScript and Ajax as already noted. SO this has been moved to the HTML forum where you will find that this discussion has already taken place many times. Please SearchFirst.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Consider Paul's rocket mass heater.
subject: Combo Box