HTML: button = send text from <textarea> to another <textarea>?

David Bagwell

New member
I am creating a chat for my website. I have everything working except for the button to send the text from the the <textarea> where you write you message to the <textarea> where your chat will appear.
Heres the code i have so far:

<div align="center">
<br><br>
<textarea name="comments" cols="70" rows="13" readonly="true">
YGK Chat 1.0.1 Started
</textarea>
<br>
<br>
<script>
function limitText(limitField, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
}
}
</script>

textarea limit 200 characters:
<br>
<textarea name="comments" cols="70" rows="2" onKeyDown="limitText(this,200);"
onKeyUp="limitText(this,200);">
ENTER YOUR MESSAGE HERE
</textarea>
<br>
<input type="submit" value="Enter" />
<br><br>
</div>
 
Back
Top