Solved

insert hypertext link in a textarea

Posted on 2003-11-14
10
829 Views
Last Modified: 2013-11-19
I need to insert a hypertext link in a textarea and when the link is selected the relevant url is opened in a new window.
0
Comment
Question by:oracle68
10 Comments
 
LVL 10

Accepted Solution

by:
Bustarooms earned 50 total points
ID: 9748072
let me ask you this... is it absolutely necessary for it to be a textarea?  meaning, will you be submitting these URLs via a form???

can it just look like a textarea

<html>
<head>
<style>
div#txtArea{
    border: 2px inset #cccccc;
    overflow-y: scroll;
    width: 372px;
    height: 160px;
padding:2px;
   
FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: arial, helvetica, sans-serif
}
</style>
</head>
<body>
<div id="txtArea">
<a href="http://www.google.com" target="_blank">Google</a><br>
<a href="http://www.yahoo.com" target="_blank">Yahoo</a><br>
<a href="http://www.experts-exchange.com" target="_blank">Experts Exchange</a>
</div>
</body>
</html>
0
 

Author Comment

by:oracle68
ID: 9748194
yes it has to be a textarea as the URLwill be submitted with the rest of the data on the HTML form.
0
 
LVL 10

Expert Comment

by:Bustarooms
ID: 9748236
is the textarea editable?
0
 
LVL 8

Expert Comment

by:klykken
ID: 9748301
bustarooms,
just a quick question regarding your example;
Is overflow-y standards compliant? Which browsers can oracle68 expect this to work in?

-klykken
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:oracle68
ID: 9748400
Bustarooms,

The textarea is readonly after the form has been initiated.
0
 
LVL 10

Expert Comment

by:Bustarooms
ID: 9748560
klykken
it will work for M$ only.  

an alternative is overflow: scroll;  however, this will add scrollbars to both vert and horz

you could also use overflow: auto; which will only put the bars on when necessary
0
 
LVL 11

Assisted Solution

by:Zontar
Zontar earned 50 total points
ID: 9752252
You can't put a hyperlink inside a textarea. If you need to submit the URL as part of a form, then put it in a hidden field in the form.
0
 
LVL 1

Expert Comment

by:cifroes
ID: 9775318
simple: you can't.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

746 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

16 Experts available now in Live!

Get 1:1 Help Now