• 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?
  • 2
1 Solution
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?
fylix0000Author Commented:
The javascript seems like a good starting point...
have a look at this.

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.

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