I have a simple form with a drop-down list, I would like to pre-fill two other input forms based on the pick in the drop-down list.
My code:
<select>
<option person="ben">Ben</option>
<option person="henry">Henry</option>
<option person="julia">Julia</option>
<option person="joe">Joe</option>
</select>
<br/>
<br/>
<b>Age</b>
<br/>
<input type="text" age="age">
<br/>
<b>Gender</b>
<br/>
<input type="text" gender="gender">
Lets assume that I pick Julia in the drop-down list, then I would like age and gender to be filled automatically, but can be changed by the user at any time after the automatic fill. I am new to all this, but I'll guess JavaScript is the way to go (jQuery or so).
I would really appreciate if you could show me an example on this.