my textarea and all its atributes is correct, but my javascript not right cannot set value of oTextbox3.
<html>
<head>
<title>Retrieving a Textbox Value Example</title>
</head>
<body>
<textarea rows="5" cols="25" name="txt2"></textarea> <br /> <textarea rows="5" cols="25" name="txt3"></textarea>
<br />
<input type="button" value="Set Values" onclick="setValues()" />
<script type="text/javascript">
function setValues() {
var oTextbox2= document.getElementById("txt2");
oTextbox2 = oTextbox2.value; oTextbox2 = oTextbox2.split(" ");
oTextbox2 = oTextbox2.sort();
var oTextbox3 = document.getElementById("txt3");
oTextbox3.value = oTextbox2;
}
</script>
</body>
</html>
oTextBox2you shouldn't change it to its value and than an array of words.oTextbox2.value.split(" ").sort();