473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 7308
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

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

Similar topics

4
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
0
by: BryanS | last post by:
I am having trouble trying to link 2 drop down lists and a repeater control. What i want is 2 drop down lists, the first being a list of food categories. When a category is selected the second...
3
by: John Walker | last post by:
Hi, On an ASP.NET page I have a drop down list control. When the user pulls down the list and makes a selection, I perform validation, and if the validation fails I want the selected item in...
5
by: ashok893 | last post by:
I'm using two drop down list ina form. I have generated the first drop down list from MySQL database. When i select an option from first drop down list, i have to generate second drop down list...
6
by: Rob Meade | last post by:
Hi all, Looking for a bit of help if possible. For about 2 weeks now I've been investigating the best way to populate related drop down menus, and have their values pre-populated again if the...
3
by: jcassan | last post by:
Hello folks. I am new to these forums and have something, which has been stumping me for little while. I am using pspell to spellcheck a scrolling textbox (textarea) containing user input. I...
1
by: bytesFTW99 | last post by:
I have been struggling with this for some time can anyone help out? just trying to have 3 dropdown boxes that fill depending on what is selected, then in some cases click a button and have the second...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.