user3009138 user3009138 - 1 year ago 80
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

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download