Click to See Complete Forum and Search --> : Post smilies into textarea


spykemitchell
10-04-2003, 10:22 AM
When posting a message you can add a smilie to the message by clicking on an image to the side of the textarea.

I want to do that so wenyou click a link it adds the specified characters to the field without deleting the prviously typed text.

so far i have

[code]<a href="#" onclick="document.form1.textarea1.value=':)'; return false;"><img src="smileys/grinning.bmp" width="15" height="15" border="0"></a>

<form name="form1">
<textarea name="textarea1">
</form>

this just replaces everything in the textarea with :) instead of adding it at the end of thetext in the field...

Can anyone help solve this...?

AdamGundry
10-04-2003, 10:43 AM
Try replacing this line

document.form1.textarea1.value=':)'

with this

document.form1.textarea1.value+=':)'

Adam

spykemitchell
10-04-2003, 12:22 PM
thankyou

:D

AdamGundry
10-04-2003, 01:33 PM
No problem :)

Adam