Solved

Add a link to a textarea

Posted on 2011-02-13
6
563 Views
Last Modified: 2012-05-11
Hi,
I have a textarea (tiny-mce).
I want to a link to the textarea, so when the user clicks on it (in the textarea) it will invoke my javascript function (or any other URL).
0
Comment
Question by:VapiSoft
6 Comments
 
LVL 38

Expert Comment

by:Aaron Tomosky
ID: 34883011
The txt area has an onclick() event.
0
 

Author Comment

by:VapiSoft
ID: 34883040
I don't want to get a click anywhere, I want to see a link (blue with underline and a hand when the cursor on it), and that when I click on it, it will go to the url (just like reguar link).
Currently, I add the '<a href="...">text</a>'
It shows the link (blue with underline), but when I put the cursor on it it does not show the hand, and the click does not do anything.
0
 

Author Comment

by:VapiSoft
ID: 34883059
See the picture.
ScreenShot-4737.jpg
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 34883099
Would that not be very annoying since you would then not be able to edit it.
0
 
LVL 16

Accepted Solution

by:
BurnieP earned 500 total points
ID: 34883126
Hi,

What control are you using?  You do not seem to be using the <textarea></textarea> control.  I tried adding an a href inside a textarea control and it will not render as a link.  In your picture I can see some kind of custom control.

Also, maybe you can try putting the events directly in the a href.  
Example :
<a href="..." onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'" onclick="window.open('google.com')">Click to upgrade Chrome</a>

This is a blinded guess.
0
 

Author Closing Comment

by:VapiSoft
ID: 34883207
It works.
Thanks.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now