Newbie question = how to add text to a textarea without deleting the
previous text.
i'm trying to add text to a text area when a link is clicked (to
add<b><i> etc) without erasing the previously typed text.
i'm using this, but unfortunately i don't know how to make this append
the text rather than just chenge the text in the text area.(where
comments is the textarea name.
<A HREF="#" onClick="(document.forms[0].comments.value='<b></b>');
return false;" NAME="anchor1" ID="anchor1">select bold</A>
thank you very much,
GD
RobG - 29 Jun 2007 03:44 GMT
> Newbie question = how to add text to a textarea without deleting the
> previous text.
[quoted text clipped - 7 lines]
>
> <A HREF="#" onClick="(document.forms[0].comments.value='<b></b>');
<... onclick="(document.forms[0].comments.value += '<b></b>');
--
Rob
GD - 29 Jun 2007 05:02 GMT
>> Newbie question = how to add text to a textarea without deleting the
>> previous text.
[quoted text clipped - 9 lines]
>
><... onclick="(document.forms[0].comments.value += '<b></b>');
thank you very much!!
is there any way that if i highlight some text the tags that i'm
adding would replace that highlighted text?
thanks again,
GD