Solved

#$%^ Textarea!!!!!

Posted on 2002-07-18
9
176 Views
Last Modified: 2013-12-24
How do I get the text area to recognize the [enter]
and display it when it returns just as it was put in.

I have tried <cfoutput>#paragraphformat#</cfoutput>
but to no avail.


any help would be great
0
Comment
Question by:jriver12
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 5

Expert Comment

by:CFXPERT
ID: 7163367
try

<pre><cfoutput>#variable Name#</cfoutput></pre>
0
 
LVL 5

Expert Comment

by:CFXPERT
ID: 7163393
just make sure you put the <pre> tag outside the <textarea> tag. like

<pre>
<textarea cols=40 row=4><cfoutput>#varName#</cfoutput></textarea>
</pre>
0
 

Author Comment

by:jriver12
ID: 7163562
Its still not formating.

the data is going into the db from the <pre><textarea></textarea></pre>

then I am recalling it like
<Pre><cfoutput>#paragraphformat(listingtext)#</cfoutput></pre>

still not recognizing the hard returns.

help


0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 5

Expert Comment

by:CFXPERT
ID: 7163861
in your DB, what is the datatype of your column?
also loose the #paragraphformat#.  

If you query a column that has /n or chr(13) characters.
the <pre> tag will preserve those non-printable charcters.


Can you post your insert code as well as your query and output code.
0
 
LVL 17

Expert Comment

by:anandkp
ID: 7164041
hi,

i'll give u a scrpit u can use this.

this script will add <br> for each enter key used in textarea.

then it will go inside the DB as

text<br>text .... <br> ....

so when u want to dislpay this - u can use
replace(#data#,'<br>',"''",'All')

so that it comes in proper formatting ... the pre tags wont help much ... as u can never be sure abt them.

let me know ... heres the script :

==========================================================
var span1=new RegExp("[\\n]","g");
var rep1=sContVal.replace(span1,"<BR>");
document.FormName.Controlname.value = rep1;
==========================================================

call this javascript before submitting the form. thats all !!!

K'rgds,
Anand
0
 
LVL 6

Accepted Solution

by:
dash420 earned 100 total points
ID: 7164212
#Replace("#Replace(                              "#Replace(
                                        JSStringFormat(HTMLEditformat(form.txtMessage)),
                                        "\n", "<br>","All")#",
                                        "\\","\","All")#",
                                        "\'","'","All")#
0
 

Author Comment

by:jriver12
ID: 7165414
thank you very much all for the help and pointers..
0
 
LVL 6

Expert Comment

by:dash420
ID: 7166244
Thanks
0
 

Expert Comment

by:dahirsh
ID: 12884333
anandkp , can you give more details into how to use

i'll give u a scrpit u can use this.

this script will add <br> for each enter key used in textarea.

then it will go inside the DB as

text<br>text .... <br> ....

so when u want to dislpay this - u can use
replace(#data#,'<br>',"''",'All')

so that it comes in proper formatting ... the pre tags wont help much ... as u can never be sure abt them.

let me know ... heres the script :

==========================================================
var span1=new RegExp("[\\n]","g");
var rep1=sContVal.replace(span1,"<BR>");
document.FormName.Controlname.value = rep1;
==========================================================

call this javascript before submitting the form. thats all !!!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
connection string question 2 69
Configure IIS to process JSON 10 80
Question to locate the problem 18 105
Adding multiple JVM environments to RedHat 6 7 18
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now