Adding Text/Images to Textarea *SOLVED*
I posted this question
"Not sure how to explain this so will use this forum as an example. When creating a new post or replying to an existing one if you click one of the smilies it is then added to the message being typed. I am creating a similar process but don't know how to add the smilie to the textarea once it has been clicked.
This is the reply I got which works fine but how can I made :rolleyes: (rolleyes) a variable so I can insert anything??
Code:
<html>
<head>
<title>
Example - by Phreak
</title>
<script language="javascript">
function addittotextarea()
{
form1.text1.value += ":rolleyes:";
}
</script>
</head>
<body>
<form name="form1">
<textarea name="text1"></textarea>
<input type="button" onClick="addittotextarea()">
</form>
</body>
</html>