Flyt select box value til textarea (problem i Firefox)
Dette fungere fint i IE, men hvorfor ikke i Firefox ?(funktionen skal gøre at det du vælger i dropdown menuer bliver flyttet til textarea når du trykker på knappen.)
<title>Untitled Document</title>
<script language="javascript" type="text/javascript">
function change() {
var x = document.getElementById("dest")
var y = document.getElementById("sea")
document.getElementById("destinations").value = document.getElementById("destinations").value + x.value + "(" + y.value + "),"
}
</script>
</head>
<body>
<form id="test" name="test" method="post" action="test2.asp">
<table>
<tr><td><select id="dest" name="dest"><option selected="selected" value="ACE">ACE</option><option value="AYT">AYT</option><option value="CHQ">CHQ</option><option value="SMI">SMI</option></select></td><td><select id="sea" name="sea"><option selected="selected" value="W0203">W0203</option><option value="S03">S03</option><option value="W0304">W0304</option><option value="S04">S04</option></select></td><td><input type="button" value="indsæt" onClick="change()"></td></td></tr>
<tr><td colspan="3"><textarea name="destinations" name="destinations" cols="15" rows="5" style="overflow:visible" readonly="readonly"></textarea></td>
</table>
</form>
</body>
