469,366 Members | 2,254 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

HOW DO I LOAD AND DISPLAY FORMATTED HTML IN TEXTAREA

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
5 24360
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
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
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
"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
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.

Similar topics

14 posts views Thread by JStrauss | last post: by
19 posts views Thread by dmiller23462 | last post: by
6 posts views Thread by tony wong | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.