aspose file tools*
The moose likes Other Application Frameworks and the fly likes how to populate dropdown box dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "how to populate dropdown box dynamically" Watch "how to populate dropdown box dynamically" New topic
Author

how to populate dropdown box dynamically

sruthi das
Ranch Hand

Joined: Dec 28, 2007
Posts: 34
hi
can any one help me how to populate dropdown box dynamically.
i have two dropdownboxes.based on the value which i select in first dropdown the corresponding values in second drop down box has to come.
i have to get both dropdown values from database.
Paras Jain
Ranch Hand

Joined: Feb 26, 2005
Posts: 137
Obviously you will have to capture the onChange event of the first drop down.
Depending on the value of this drop down you will send the request to the server and populate the value in the second drop down. You can send the request asynchronously using Ajax etc or through simply form submit using Javascript.
You can use JQuery or plain Javascript to capture onChange events etc


Paras Jain
SCJP 5.0
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Which framework are you using?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sruthi das
Ranch Hand

Joined: Dec 28, 2007
Posts: 34
I am using spring framework.
I want it by using javascript.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to populate dropdown box dynamically