I have an extremely simple HTML page with two drop-down menus, one on the left and one on the right.
I would like to display the option that the user choses of the left menu above the left menu, and the chosen value from the right menu above the right menu. Both options can be identical or different, just text, and do not influence each other.
So far I've tried every solution that was explained here and here but nothing worked, even when I just copied and pasted the exact example codes into my html page.
This is what my code looks like right now:
<html>
<body>
<head>
<script type="text/javascript">
var select = document.getElementById('cmbitems');
var input = document.getElementById('txtname');
select.onchange = function() {
input.value = select.value;
}
</script>
</head>
<table>
<tr>
<td colspan="2">DISPLAY</td>
</tr>
<tr>
<td>RESULT 1 <input type="text" name="cmbitems" id="cmbitems" onClick="checkItem()"></td>
<td>RESULT 2</td>
</tr>
<tr>
<tr>
<td>
BEGINNING
<select name="cmbitems" id="cmbitems">
<option value="name1">flow</option>
<option value="name2">green</option>
<option value="name3">red</option>
</select>
</td>
<td>END
</td>
</tr>
</table>
</body>
</html>
I'd be grateful is someone could help out! Trying to make this just one page without external JS or JQuery calls... Thank you!
TITLE
WORD SELECTED IN MENU 1 - WORD SELECTED IN MENU 2
MENU 1 - MENU 2 – MicroMachine May 07 '15 at 08:33