Hi all how do you display the value of a drop down list in a text field. Example : <select name="destin" id="destin" onchange="getPrice();"> <option value="Dublin 1">Abbey St</option> <option value="Dublin 2">Amiens St</option> <option value="Dublin 3">Capel St</option> </select> I need to display the area code "dublin 1, 2, or 3" in a readonly textfield. Thanks and Top of the morning to ya. I wonder do people actually think the Irish say that.
In the end this is the code i got to work var el = document.getElementById('destin'); var inp = document.getElementById('input12'); inp.value = el.options[el.selectedIndex].value ;