Skip to main content
Inspiring
April 3, 2008
Answered

Empty Space Generated by Coldfusion

  • April 3, 2008
  • 1 reply
  • 433 views
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.
This topic has been closed for replies.
Correct answer -__cfSearching__-
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

1 reply

-__cfSearching__-Correct answer
Inspiring
April 4, 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 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