Solved

#$%^ Textarea!!!!!

Posted on 2002-07-18
9
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

623 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