By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,606 Members | 2,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,606 IT Pros & Developers. It's quick & easy.

HOW DO I LOAD AND DISPLAY FORMATTED HTML IN TEXTAREA

P: n/a
I am filling a TEXTAREA with text and links from a database. I need to
display the <a href....> code in the TEXTAREA as a clickable link with
_blank targetting.

I realise I could simply use a TD but a closed table design and
limited space require me to scroll the data loaded from the database.

I need to avoid LAYERS for the sake of cross browser compatability
(some 3rd world users) so would really like to stick to the TEXTAREA.

Is there a way to manipulate a TEXTAREA using JAVASCRIPT to reach the
results I want??

Thanks to anyone with constructive ideas.....:-)
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
In article <be*************************@posting.google.com> ,
ri************@yahoo.com enlightened us with...
I am filling a TEXTAREA with text and links from a database. I need to
display the <a href....> code in the TEXTAREA as a clickable link with
_blank targetting.


As far as I know, that isn't possible.

Any reason an IFRAME won't do as you require?
-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #2

P: n/a
ri************@yahoo.com (Richard) writes:
I am filling a TEXTAREA with text and links from a database. I need to
display the <a href....> code in the TEXTAREA as a clickable link with
_blank targetting.
Don't use a textarea then. Textareas contain only unformatted text.
I realise I could simply use a TD but a closed table design and
limited space require me to scroll the data loaded from the database.
The put a scrollbar on your td.
<td style="height:400px;overflow:auto;">Big Bad Content</td>
I need to avoid LAYERS for the sake of cross browser compatability
(some 3rd world users)
The word "layer" has so many meanings in HTML that it should be avoided.
I would have assumed that you meant the Netscape 4 tag <layer>, but then
3rd world users would be *more* likely to support it, so you must mean
something else.

That blows away the overflow:auto idea though, since that requres a
moder browser.
so would really like to stick to the TEXTAREA.
All you want from the textarea is the scrolling. If you want formatted
content, you must use something else and make it scroll.
Is there a way to manipulate a TEXTAREA using JAVASCRIPT to reach the
results I want??


No.

If you want to support as different browsers as Netscape 4 and
Netscape 7 (two completely unrelated browsers) and IE, you will
probably have to go for a combination of solutions. Use a <layer> (or
a positioned div) for Netscape 4, and use modern techniques for modern
browsers, and then use Javascript to make sure only one solution is
in effect at a time.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #3

P: n/a
Richard wrote:
I realise I could simply use a TD but a closed table design and
limited space require me to scroll the data loaded from the database.

I need to avoid LAYERS for the sake of cross browser compatability
(some 3rd world users)


It would appear that your page design does not fit your functional
requirements. The only satisfactory solution is going to be to address
the page design, imho.
drew mclellan

Jul 20 '05 #4

P: n/a
"Richard" <ri************@yahoo.com> schrieb im Newsbeitrag
news:be*************************@posting.google.co m...
I am filling a TEXTAREA with text and links from a database. I need to
display the <a href....> code in the TEXTAREA as a clickable link with
_blank targetting.

I realise I could simply use a TD but a closed table design and
limited space require me to scroll the data loaded from the database.

I need to avoid LAYERS for the sake of cross browser compatability
(some 3rd world users) so would really like to stick to the TEXTAREA.

Is there a way to manipulate a TEXTAREA using JAVASCRIPT to reach the
results I want??

Thanks to anyone with constructive ideas.....:-)


I think you will have to use a frameset for what you want to do.

--
Markus
Jul 20 '05 #5

P: n/a
Thanks everybody for your help.....It looks as though I'll have to use
a combination of solutions to satisfy the ancient browser problem.

All the best, R
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.