Rodzilla
06-27-2003, 12:35 PM
I'm new to JavaScript and am wondering how (newbie style, please) I can make text typed in a textarea box which is located in the left side of a 2-framed page appear in the right side of the framed page.
Here's what I have for the code:
function typetext()
{
var user_text = new String();
user_text = document.forms[0].userstext.value;
var x = user_text.length;
var stringArray = new Array();
if (x > 0)
{
for (var i = 0; i < stringArray.length; i++)
{
parent.output.document.write (stringArray[i]);
}
}
}
Here's my form portion:
<p><font style = "font-size: 10pt; color: #000000; font-family: tahoma, times new roman; font-weight:
bold">Type your text in this box</font>
<textarea name = "userstext" rows = "5" cols = "20" onSelect="typetext()" /></textarea></p>
I'm probably WAY off base but am trying.
Thank you!
Here's what I have for the code:
function typetext()
{
var user_text = new String();
user_text = document.forms[0].userstext.value;
var x = user_text.length;
var stringArray = new Array();
if (x > 0)
{
for (var i = 0; i < stringArray.length; i++)
{
parent.output.document.write (stringArray[i]);
}
}
}
Here's my form portion:
<p><font style = "font-size: 10pt; color: #000000; font-family: tahoma, times new roman; font-weight:
bold">Type your text in this box</font>
<textarea name = "userstext" rows = "5" cols = "20" onSelect="typetext()" /></textarea></p>
I'm probably WAY off base but am trying.
Thank you!