Hey all,
I'm working on setting up a "Send this link to a Friend" page. The
page has a couple of inputs and a textarea. I have some default text
in the textarea that is populated at the time of page load. What I
would like to do is replace the "Dear Friend" in the textarea with the
name of the friend once it is entered in the input.
I don't really know where to start...
Thanks for the help, Greg
Some code:
--------------------------------------------------------------
<html>
<head>
<title></title>
<script type="text/javascript">
var message = "Dear Friend,\n\Check this out: url\n\nEnjoy...";
function populateTextarea() {
document.sendMessageForm.messageArea.value=message ;
}
</script>
</title>
<body onLoad="javascript:populateTextarea();">
<form name="sendMessageForm">
Friends Name:
<input type="text name="friendsName" /><br/>
Your Name:
<input type="text" name="yourName" /><br/>
Message:
<textarea rows="10" cols="80" name="messageArea"></textarea>
<br/>
<input type="submit" name="Send Message" />
</body>
</html>
-----------------------------------------------------