• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

How to create a dynamic drop down menu from a table in your database?

Hi, I have a simple table such as

create table A (
column1 varchar(20),
column2 varchar(20)
)

I want to create a drop down menu selection  like here in this page : http://javascript.internet.com/forms/auto-drop-down.html#source

However, here is the trick, i want this menu to update automatically the choice of selection for each and every row I added into the table A.  Thus if table A has 20 row then this menu will have 20 selection.

Can anyone show me how to approach this issue?
0
fylix0000
Asked:
fylix0000
  • 2
1 Solution
 
fargoCommented:
there are two ways to do it.

1) using javascript to maintain the dependent dropdown box
2) using server side roundtrip

which way do u prefer?
0
 
fylix0000Author Commented:
The javascript seems like a good starting point...
0
 
fargoCommented:
have a look at this.
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21123826.html

at the end of it, there is an initialisation of the array..u need to populate those from the db query.
Try it and let us know if u find any problems.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now