to add the values to text area which are formatted

admin

Administrator
Staff member
Hi,

I am adding the values typed in text box toa text area on click of a button.The text area shows values 2 nd value added
next to the first value.I wanted the 2nd value to appear in the next line.

here is the sample code.


<html>
<head>
<script>
function test()
{

document.frmupper.Textarea1.value=document.frmupper.Textarea1.value + document.frmupper.txtupper.value;

}

</script>

</head>
<form name="frmupper">
Upper Form
<input type="hidden" name="h1" value=http://www.webdeveloper.com/forum/archive/index.php/"inital">
<input type="text" name="txtupper" value="txtupper">
<input type="button" name="add" value="add" onclick="test();">
<br />
<textarea name="Textarea1" rows="5" readOnly cols="65" ID="Textarea1"></textarea></td>
</form>
</html>
 
Back
Top