468,275 Members | 1,805 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,275 developers. It's quick & easy.

Fill other drop down lists using value selected from a drop down list

Hi there,

For my application, i need to have 3 drop down lists
1. drop down list of folder names
2. drop down list of documents in the folder selected
3. drop down list of instances of the document selected
(my application uses the BusinessObjects Java Web Services SDK)

The 2nd list is dependent on the 1st, while the 3rd list is dependent on the 2nd. In other words, this is what i want my application to do
-select a folder from the 1st drop down list
-the 2nd drop down list will be populate
-select a document from the 2nd drop down list
-the 3rd drop down list will be populate

I tried using javascript (onChange) to change the values in the 2nd list but i couldn't.

Should i
- create the 2nd and 3rd drop down lists as hidden and access them when the folder has been chosen
- create only the 1st drop down list and create the 2nd and 3rd as values are selected

Any help will be appreciated!
Jun 1 '07 #1
3 6823
dmjpro
2,476 2GB
Hi there,

For my application, i need to have 3 drop down lists
1. drop down list of folder names
2. drop down list of documents in the folder selected
3. drop down list of instances of the document selected
(my application uses the BusinessObjects Java Web Services SDK)

The 2nd list is dependent on the 1st, while the 3rd list is dependent on the 2nd. In other words, this is what i want my application to do
-select a folder from the 1st drop down list
-the 2nd drop down list will be populate
-select a document from the 2nd drop down list
-the 3rd drop down list will be populate

I tried using javascript (onChange) to change the values in the 2nd list but i couldn't.

Should i
- create the 2nd and 3rd drop down lists as hidden and access them when the folder has been chosen
- create only the 1st drop down list and create the 2nd and 3rd as values are selected

Any help will be appreciated!

R u trying reflect the list according to ur DataBase or it is known by u???
If it is from the data base then it is better to handle with AJAX.
If not then try using Option object in JS.
Try to search google .. how to update dynamic contents in select.
Best of luck.

Kind regards,
dmjpro.
Jun 2 '07 #2
r035198x
13,262 8TB
Hi there,

For my application, i need to have 3 drop down lists
1. drop down list of folder names
2. drop down list of documents in the folder selected
3. drop down list of instances of the document selected
(my application uses the BusinessObjects Java Web Services SDK)

The 2nd list is dependent on the 1st, while the 3rd list is dependent on the 2nd. In other words, this is what i want my application to do
-select a folder from the 1st drop down list
-the 2nd drop down list will be populate
-select a document from the 2nd drop down list
-the 3rd drop down list will be populate

I tried using javascript (onChange) to change the values in the 2nd list but i couldn't.

Should i
- create the 2nd and 3rd drop down lists as hidden and access them when the folder has been chosen
- create only the 1st drop down list and create the 2nd and 3rd as values are selected

Any help will be appreciated!
You cannot connect to a database using javascript.
So if all the data is stored in a database you'll need to use one of two methods.
1.)Load all the data from all the three tables into three arrays(or hidden selects). Then you can manipulate those arrays onChange of the selects.
2.) Load only the first non-dependant select. On change of that select, use Ajax to to call a server side script that returns the appropriate values for the other selects
Jun 2 '07 #3
acoder
16,027 Expert Mod 8TB
Read up on AJAX with the tutorials in the Offsite Links stick thread (near the top of this forum). Some of them have examples similar to what you require. If you get stuck, post again with your code.
Jun 4 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Yoshitha | last post: by
5 posts views Thread by Vigneshwar Pilli via DotNetMonster.com | last post: by
reply views Thread by BryanS | last post: by
3 posts views Thread by John Walker | last post: by
1 post views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.