insert hypertext link in a textarea

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.
oracle68Asked:
Who is Participating?
 
BustaroomsCommented:
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
 
oracle68Author Commented:
yes it has to be a textarea as the URLwill be submitted with the rest of the data on the HTML form.
0
 
BustaroomsCommented:
is the textarea editable?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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

-klykken
0
 
oracle68Author Commented:
Bustarooms,

The textarea is readonly after the form has been initiated.
0
 
BustaroomsCommented:
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
 
ZontarCommented:
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
 
cifroesCommented:
simple: you can't.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.