Can a user add a link to a text area by clicking a button?

I have a form which updates to my database. I want to give the user the option to turn something into a link by highlighting the text and then clicking a button which will open a new window where they type the link address. When they close the window the highlighted text should be turned into a link. An example is Yahoo mail or most other mail programs where you turn text into a link. Can anyone either explain how I do this or point me in the right direction? Thanks.
LVL 4
elliottbenzleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GawaiCommented:
0
biztigerCommented:
Check this out
http://www.webxpertz.net/forums/showthread.php?s=&threadid=15883&highlight=textarea
and
http://www.tek-tips.com/viewthread.cfm?qid=1115976&page=3

Use prompt to take the url from the user

Also you can try other popular wysiwyg editor such as tinymce and fckeditor.

http://tinymce.moxiecode.com/
http://www.fckeditor.net/

As they are open source you can look at their code also, to find your solution. The most simplistic action you will find at:
http://livepipe.net/control/textarea
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
b0lsc0ttIT ManagerCommented:
In case it isn't obvious from the posts above you need to use something else to do it.  A textarea tag can't do this.  With script you might get selected text and even modify it but the textarea can't show a hyperlink; it is just basic text.
There area a number of suggestions above for replacements that will do it.  There are even more available.  Another good one is at http://www.textarearich.com/ .  There is also some good info on more at http://www.htmlarea.com .  The one at the bottom of the page is an old, good, reliable one.  If you want to see a search result with a number of others you can look at http://www.google.com/search?num=100&hl=en&safe=off&q=rich+textarea&btnG=Search .
Let me know if you have a question about any of this or need more info.
bol
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.