Solved

insert hypertext link in a textarea

Posted on 2003-11-14
10
871 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

617 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