Solved

insert hypertext link in a textarea

Posted on 2003-11-14
10
861 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
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 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Text too large in Chrome 17 83
Any Way to rotate banner ads from Commission Junction? 2 59
Two decimal 5 43
Tell me if I understand this correctly... 6 18
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

734 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