Hello i got a selection menu, i need to update 3 text boxes when the selection is done, and should load a default 1 as follows..
<select name="select" id="select">
<option value="1">selection 1</option>
<option value="2">selection 2</option>
<option value="3">selection 3</option>
</select>
<input type="text" name="txt1" id="txt1" value="1"/>
<input type="text" name="txt2" id="txt2" value="2"/>
<input type="text" name="txt3" id="txt3" value="3"/>
// if selection 1 is selected text box's values should come as follows, (Default)
id="txt1" value="1" >> id="txt2" value="2" >> id="txt3" value="3"
// if selection 2 is selected text box's values should come as follows,
id="txt1" value="4" >> id="txt2" value="5" >> id="txt3" value="6"
// if selection 3 is selected text box's values should come as follows,
id="txt1" value="7" >> id="txt2" value="8" >> id="txt3" value="9"
any JavaScript help?? many thanks!!!
onchangeevent, based on the select value, update your textbox. To get you started:document.getElementById("select").onchange = function() { console.log(this.value); //select value }