Guest_imported
New member
- Jan 1, 1970
- 0
I'm having problems add text from a text field to a textarea
originally I was just trying to change the value but in the future I would like to add additional text.
here is my code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE='JavaScript'>
<!--
user = 'Name';
messagetext = 'Message';
function AddToBoard(){
user = document.Msg_Form.UserName.value;
messagetext = document.Msg_Form.NewText.value;
user = user + messagetext;
textObj = document.Msg_Board_Form.MsgBoard;
textObj.value = user;
}
-->
</SCRIPT>
<TITLE></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">
<div align="center">
<FORM NAME="Msg_Board_Form" onSubmit="AddToBoard();">
<TEXTAREA NAME="MsgBoard" ROWS="50" COLS="65" readonly onFocus="this.blur()"></TEXTAREA>
</FORM>
<br><br><br><br>
<FORM NAME="Msg_Form">
<table>
<tr>
<td>Name:</td>
<td>
<INPUT NAME="UserName" TYPE="text" VALUE="[Name]" SIZE="40" MAXLENGTH="40">
</td>
</tr>
<tr>
<td>Message:</td>
<td>
<TEXTAREA NAME="NewText" ROWS="8" COLS="40" WRAP="virtual" value="">[Message]</TEXTAREA>
</td>
</tr>
<tr>
<td></td>
<td>
<INPUT TYPE="button" NAME="submit" VALUE="Submit" onClick="AddToBoard();">
</td>
</tr>
</table>
<br>
</FORM>
</div>
</BODY>
</HTML>
originally I was just trying to change the value but in the future I would like to add additional text.
here is my code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE='JavaScript'>
<!--
user = 'Name';
messagetext = 'Message';
function AddToBoard(){
user = document.Msg_Form.UserName.value;
messagetext = document.Msg_Form.NewText.value;
user = user + messagetext;
textObj = document.Msg_Board_Form.MsgBoard;
textObj.value = user;
}
-->
</SCRIPT>
<TITLE></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">
<div align="center">
<FORM NAME="Msg_Board_Form" onSubmit="AddToBoard();">
<TEXTAREA NAME="MsgBoard" ROWS="50" COLS="65" readonly onFocus="this.blur()"></TEXTAREA>
</FORM>
<br><br><br><br>
<FORM NAME="Msg_Form">
<table>
<tr>
<td>Name:</td>
<td>
<INPUT NAME="UserName" TYPE="text" VALUE="[Name]" SIZE="40" MAXLENGTH="40">
</td>
</tr>
<tr>
<td>Message:</td>
<td>
<TEXTAREA NAME="NewText" ROWS="8" COLS="40" WRAP="virtual" value="">[Message]</TEXTAREA>
</td>
</tr>
<tr>
<td></td>
<td>
<INPUT TYPE="button" NAME="submit" VALUE="Submit" onClick="AddToBoard();">
</td>
</tr>
</table>
<br>
</FORM>
</div>
</BODY>
</HTML>