Hello,
I have this page in html and I would like to know how I can do it so that when changing the chosen item in the dropdown menu, the html fields change.
<fieldset id="fsItem">
<legend>Item
<button id="bAnt"><</button>
<input type="text" class="input" id="idItem" value="0" disabled>
<button id="bNex">></button>
<button id="bAdd">+</button>
<button id="bRem">–</button>
</legend>
<label>Item</label>
<select>
<option value="person">Person</option>
<option value="vehicle">Vehicle</option>
<option value="animal">Animal</option>
</select>
<p><label>Name</label>
<input type="text" class="input" id="nameItem" value="" disabled>
<p><label>Age</label>
<input type="text" class="input" id="ageItem" value="" disabled>
<label id="lbAs">Associate</label>
<input type="checkbox" class="input" id="chkAs" value=""></p>
<p><label>Details</label>
<textarea class="input" id="detailsItem" rows=5 disabled></textarea></p>
The default page would be "Person". When selecting "Vehicle", for example, the "Name" and "Age" fields would be replaced by "Type" and "Color". The Associate would disappear.
Thanks in advance,