473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 24700
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: hoke | last post by:
I want to display plain text files in the browser. The files contain html and javascript and have a .txt extension. This works fine with files with just html. Unfortunately when showing files with...
14
by: JStrauss | last post by:
Hello, Can anybody give me some tips on the best and/or easiest way to display multiple lines in a field. The data is collected from a "textarea" field when the form is submitted, and I want to...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
4
by: frogman042 | last post by:
My daughter is playing around trying to learn JavaScript and she wrote a small program that prints out a message in increasing and decreasing font size and color changes. She is using document...
6
by: tony wong | last post by:
i wish to count number of characters in textarea box during typing in and display it somewhere in html page. so the number will increase during writing. is it possible to do it by javascript? ...
2
by: Jake Barnes | last post by:
Imagine I've this block of HTML: <p>Alex Schein Mailing List <input type="checkbox" name="newslettersToUse" value="133156"> (<a href="mcControlPanel.php"...
1
by: snipersix | last post by:
How do you display values in a textarea using javascript. ex. i have 2 radio buttons o Adult =$9.99 o Child =$6.99 i need it to be, so that if i select adult in the...
5
by: libsfan01 | last post by:
Hi all Im trying to write a script that pulls data from another page (which is getting data from a db). The contents displayed on the db handling page (display.php) gets transferred through...
1
by: lihao0129 | last post by:
The scenario is a RTF(Rich Text Format) editor where I can input text and meanwhile display 'style'd text or multimedia( i.e bold fonts, pictures, movies ) in the same box... I am currently...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.