| Author |
Dynamic Drop down based on another value in the same form
|
Serena Zhou
Ranch Hand
Joined: Dec 13, 2003
Posts: 31
|
|
In a JSP form, I want to give one of the drop down box's select value from DB based on the value that user has chosen from another drop down box, So that If I have chosen Unit A from Unit drop down box, the Employee drop down box will only show the employees from Unit A instead of all the employees from whole organization(Say in DB, they are tables with foreign key referring to each other ) Is there any way to do it? Thanks!
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56204
|
|
|
Search through this and the HTML forum as this topic has been discussed on numerous occasions. You are bound to find info that is useful for you.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Sonny Gill
Ranch Hand
Joined: Feb 02, 2002
Posts: 1211
|
|
Quick hint: The simplest way would be to submit the form when the user selects a value in the first dropdown, and populate the second dropdown based on user selection when showing the from again. Otherwise, you can use Javascript, iframes etc..to dynamically update the second dropdown. As Bear said, you will find info on that if you search through the HTML forum. Cheers.
|
The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
|
 |
 |
|
|
subject: Dynamic Drop down based on another value in the same form
|
|
|