473,241 Members | 1,546 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,241 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 7303
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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...

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.