Forum Moderators: open
I have a form that has a combo box that pulls values from the database. The concept is
Option 1: [combo box with values a, b, c, d that are pulled from a mysql query]
Then, if you click an [add] button you get another combo box (Option 2: [combo box with values a, b, c, d that are pulled from the mysql query].
This way if you only want one option, you can pick it. If you want multiple options, you can have as many as you want.
I've done this successfully with javascript calling createElement('input'), and createElement('TEXTAREA') but I've never done it with createElement('option'). I can't seem to find any posts or tutorials that address this.
Thanks,
Ofie
I think you want to add a new Option [w3schools.com] object to the options[] array of a Select [w3schools.com] object.
Here's an example [w3schools.com].