views:

600

answers:

1

I've got 2 dropdownboxes. Dropdownbox 1 shows all the tables from a database. When dropdownbox 1 is selected; dropdownbox 2 will be populated with tablefields from the selected table.

dropdownbox 1: This dropdown is populated with the following mysql query: "show tables from testdb"

dropdownbox 2: This dropdown will auto populate when dropdownbox 1 is selected. Dropdownbox 2 will be populate with the following query: "describe tablename" //tablename selected from dropdownbox 1

I want to make this using jquery. Can anyone point me into the right direction?

+1  A: 

There's a good writeup on it here:

http://remysharp.com/2007/01/20/auto-populating-select-boxes-using-jquery-ajax/

You are looking for related dropdowns, and this does exactly what you need, as long as you can provide it with the table names and columns.

I should be able to help you further, if you give me more information about what sort of backend technology you are using.

Cheers

Marcos Placona
I'd throw the word cascade in there too, will help in searching for more info.
Nick Craver
Your example is using submit to populate dropdownbox 2. I need another method.
Xin
remysharp.com++
macek