<script>
function wrapWithTag(formObj,tagname){
formObj.value="<"+tagname+">"+formObj.value+"</"+tagname+">";
}
</script>
<form name="myform">
<input type="text" name="mytext" value="Whatever">
</form>
<input type="button" name="button" value="Button"
onclick="wrapWithTag(myform.mytext,'b');">
Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net
[EMAIL PROTECTED]
(704) 569-0801 ext. 254
************************************************************************
*************
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of
Garrison Enterprises Inc.
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]
************************************************************************
*************
-----Original Message-----
From: Phillip B [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 1:26 PM
To: CF-Talk
Subject: OT: form/javascript help
I know this can be done but I stink at java script. I want to select
some text in a text field. Then click a graphic on the page and have it
put an HTML tag around the selected text in the form field. Any idea on
how to do this or where to find the code that does this?
Phillip B.
www.LoungeRoyale.com
www.FillWorks.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Get the mailserver that powers this list at
http://www.coolfusion.com