473,594 Members | 2,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 24716
In article <be************ *************@p osting.google.c om>,
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:4 00px;overflow:a uto;">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.goog le.com...
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
4121
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 javascript, I get an "error on page" warning and the page is not displayed. I suppose that when Internet Explorer discovers a <script> tag he starts to interpret it. This is not what I want. After all Internet Explorer is a browser and not an...
14
2491
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 display all of the data (multiple lines) in a resulting HTML page. The data displays on a single line (obviously) and does not wrap without manipulation of the string variable. Is there an easier way to display the data? Thanks, Joe
19
6871
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 JavaScript in this code from a couple different sites but I'm not 100% sure what each line is doing...This is the ASP code that I'm using for the page....Take a look at the JavaScript code and please let me know what each line is doing....I have been...
4
3403
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 write and it works fine until she puts it into a function and then calls the function from a button with onClick. This also seems to work OK, with the exception that the page is cleared, and the curser changes (and stays) as an hourglass. In...
6
11622
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? Thanks a lot. Tony
2
9031
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" onClick="hideOrShowDivById('emailList133156'); return false;">See emails?</a>)</p> <form method="post" action="mcControlPanel.php" id="emailList133156" style="display:none;"><textarea name="formInputs">nazjeehaj@son.org,
1
2129
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 radio button option , it will display 9.99 in my textarea at the other frame. Cause im using 2 frames for this html file. The radio buttons are at the left frame and the textarea is at the right frame.
5
2347
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 XMLHttpRequest continuously, however when setting the value using getElementById the value of the element is not being replaced, it is being appended each time. Here is my code, how can i modify the code to replace the contents of the element...
1
1853
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 using some HTML tags in textarea and make a "preview" and a "refresh" button to sync between the writepad(textarea) and the preview zone(div). But somehow the HTML tags in textarea look messy... Since text in 'textarea' can not display HTML...
0
7947
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7880
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8010
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8242
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6665
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.