Meaningless Drivel is fun!*
The moose likes JSP and the fly likes Dynamic combo box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Dynamic combo box" Watch "Dynamic combo box" New topic
Author

Dynamic combo box

                            
Greenhorn

Joined: Dec 15, 2006
Posts: 18
i my application i need to select two values
for example name of country and state.
if i select name of country from first then automatically
only names of states in that country should come in the second combo
how can i achieve this
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Hi Santosh,

This is a very common question.
Search this, and the HTML/Javascript forum.
There are several approaches to doing this.
All have been discussed at length.

When searching, you'll probably have better luck if you use the term "select list". Combo boxes do not exist in HTML.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

A term for this that I see bandied about often is "dependent dropdowns".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joshua Cloch
Ranch Hand

Joined: Apr 27, 2006
Posts: 95
or you can search "double combo".


truehh@hotmail.com
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamic combo box