Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

#$%^ Textarea!!!!!

Posted on 2002-07-18
9
Medium Priority
?
189 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
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 
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 400 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

718 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