Solved

Add a link to a textarea

Posted on 2011-02-13
6
565 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

776 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