...

View Full Version : Form Updater



blug
10-13-2011, 05:18 PM
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?

Old Pedant
10-13-2011, 11:03 PM
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...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum