• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Empty Space Generated by Coldfusion

Explorer ,
Apr 03, 2008 Apr 03, 2008

Copy link to clipboard

Copied

Using Coldfusion to create a MySQL database entry creator and editor. On the page is a textarea tag, and when I run the page there is a lot of empty lines in the box. The entry is there, just below the bottom edge of the textarea box.

The code is:

<th colspan="3">
<!--- Gets the Full Event for the News & Events Page --->
<cftextarea name="lgEvent"
id="lgEvent"
cols="65"
rows="5"
label="lgEvent"
required="yes"
richtext="no"
maxlenght="1000"
>
<cfoutput>
#FullEvent#
</cfoutput>
</cftextarea>
</th>

How do I fix this. This is not the first time I am getting unneeded lines on my web pages. Empty lines are also being inserted into the HTML code.
TOPICS
Advanced techniques

Views

381

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Apr 03, 2008 Apr 03, 2008
Remember, the code is inside a textarea tag. So any new lines/spaces you place in the code will also appear in the textarea. If this is undesirable, do not use any spaces or new lines in between the value, closing symbol and closing textarea tag.

<!--- maxlenght should be "maxlength" --->
<cftextarea name="lgEvent"
id="lgEvent"
cols="65"
rows="5"
label="lgEvent"
required="yes"
richtext="no"
maxlenght="1000"
><cfoutput>#FullEvent#</cfoutput></cftextarea>

But why not just use the value attrib...

Votes

Translate

Translate
Valorous Hero ,
Apr 03, 2008 Apr 03, 2008

Copy link to clipboard

Copied

LATEST
Remember, the code is inside a textarea tag. So any new lines/spaces you place in the code will also appear in the textarea. If this is undesirable, do not use any spaces or new lines in between the value, closing symbol and closing textarea tag.

<!--- maxlenght should be "maxlength" --->
<cftextarea name="lgEvent"
id="lgEvent"
cols="65"
rows="5"
label="lgEvent"
required="yes"
richtext="no"
maxlenght="1000"
><cfoutput>#FullEvent#</cfoutput></cftextarea>

But why not just use the value attribute?

<cftextarea value="#FullEvent#" ....>
http://livedocs.adobe.com/coldfusion/7/htmldocs/00000341.htm

If you check the documenatation, there are several settings for controlling whitespace

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation