Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Form Updater
10-13-2011, 04:18 PM #1
- Join Date
- Oct 2011
- Thanked 0 Times in 0 Posts
Hey guys, I am currently doing an assignment with a couple of group members but I have ran into a bit of a problem.
I have a dropdown box and 3 Input Fields. The dropdown box contains a bunch of Names from the database, and what I want it do is make the input fields update depending on what value I select from the dropdown box.
I was wondering what would be the best way to do this... since I am not sure how to create a dynamic elements. Could someone point me in the right direction?
10-13-2011, 10:03 PM #2
Why would you want to create elements dynamically???
Just copy the selected value(s) from the <select> into <input> fields that already exist in the same <form>. Nothing could be simpler.
Are you going to use a <select multiple> (where the user can choose more than one <option>) or do you intend to have a simple <select> and, each time it is change, take the newly selected value and put it into an <input>?
Or do you mean that when you select one <option> all three fields are filled in with data *related* to the given <option>? If so, where does that additional related data come from? [HINT: You actually *can* hide it all in the value= of the <option>s.]
Or or or or...
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.