Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / June 2007



Tip: Looking for answers? Try searching our database.

Newbie question = how to add text to a textarea without deleting the previous text.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GD - 29 Jun 2007 03:39 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.