user3009138 user3009138 - 3 months ago 4x
HTML Question

HTML select value assign to html field

I need a little help (i can`t figure out). How i can put a selected HTMl field value to another HTMl field when i select some value from the first field.

Explanation of the problem in picutre

Best regards
Trajce Gogov


One Javascript solution could be:

<script type="text/javascript">
var dropdownList = document.getElementById("dropdownList");
var dropdownListValue = document.getElementById("dropdownListValue");

if(dropdownList != null) {
    dropdownList.innerHTML = dropdownListValue;

Not proof-tested so not entirely sure if working. However, make sure you put it at the bottom of your page to allow everything load up and run BEFORE the Javascript.