if you want to edit a listbox, and populate a new one, you can design that here:
http://phpcode.hu/teszt/ajax/
this site makes then an updater code, which gives you a basic idea how to fill the existing data into a ~'div'
i suggest don't hardcode the first dropdown, that destroys the dynamism of your program.
This generator can built your table structure, so its helpful if you write such a program from the very beginning.