Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

insert hypertext link in a textarea

Posted on 2003-11-14
10
Medium Priority
?
873 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
8 Comments
 
LVL 10

Accepted Solution

by:
Bustarooms earned 200 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 

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 200 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

824 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