/    Sign up×
Community /Pin to ProfileBookmark

preventing text clipping in Textarea

How do I prevent my text from clipping in my textarea once the user has overflown the set dimensions of the textarea, I noticed once this has been done the text that overflowed was clipped from being printed, I use a small deminsioned textarea with only 14 text lines deep, and this is used for poetry, as you can see that is roughly 3 – 2 verses long, obviusly that is a problem, any help, any one?
Code One

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@JonaMar 06.2003 — You mean you want to prevent the textarea from wrapping? Sorry, I don't really understand the way you put your question. Maybe it's just me....
Copy linkTweet thisAlerts:
@Code_OneauthorMar 06.2003 — --------------->(top of textarea)

blabbbbbbbb|->printer prints

blabbbbbbbb|->printer prints

blabbbbbbbb|->printer prints

blabbbbbbbb|->printer prints

blabbbbbbbb|->printer prints

blabbbbbbbb|->printer prints

blabbbbbbbb|->printer prints

--------------->(end of textarea)

blabbbbbbbb|->cut off from printer->this is text extended beyond the specified textarea dimension.

blabbbbbbbb|->cut off from printer->this is text extended beyond the specified textarea dimension.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note for Jona:*As you can see once the text extends past the set textarea dimensions, the text which has extened is "clipped", or cut off from being printed by the printer.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I hope you can understand now. If you or anyone else has any information as to prevent this from happening, BESIDES making the textarea larger, please do not hesitate to inform.
Thanks
Code One
Copy linkTweet thisAlerts:
@JonaMar 06.2003 — <textarea wrap="nowrap"></textarea>

Right? No... other than not stopping it from wrapping I don't think there is any way to prevent a certain part from being printed, although it may be possible. Yes, you could set a certain amount of lines in the textarea to a variable and then see if you could open a new window, print that variable to the page, then automatically prompt to print the page, then close the page.
Copy linkTweet thisAlerts:
@Code_OneauthorMar 06.2003 — Jonah,

thanks for trying
Copy linkTweet thisAlerts:
@mikehumpJun 17.2009 — It has to do with when a questioner types in a question with a ".

Example:

I have a form where visitor's can AskACatholic @ AskACatholic.com

http://www.askacatholic.com/question/askus_a_question_today2.cfm

When you type this in the form (from the Catechism):
-------------------------


Why such extreme veneration of Mary? I do agree that she is blessed among women, but to say she is the queen of everything seems like too much.

966 "Finally, the Immaculate Virgin, preserved free from all stain of original sin, when the course of her earthly life was finished, was taken up body and soul into heavenly glory, and exalted by the Lord as Queen over all things, so tat she might be the more fully conformed to her Son, the Lord of lords and conqueror of sin and death."
--------------------------


It shows up OK in the preview page:

http://www.askacatholic.com/question/askus_newquestion_preview2.cfm

but NOT on the thank-you page because the double quotes " after 966 are stopping the full text of the question on the landing pages and e-mails that are being sent to the questioner and us, the answer people through CFMAIL.

I get this:
----------------


Why such extreme veneration of Mary? I do agree that she is blessed among women, but to say she is the queen of everything seems like too much.

966
----------------



I use a CFFORM custom tag to send the questions to the people who will answer it with CF_MAIL, but it is cutting the text off.

Granted my situation may be a little different then Jonah's situation.

I think the problem has to do with which is processed first: the Cold Fusion or the Java Script. Here is my custom tag:

The CFSET tags for clearing up this problem are not working.

[CODE]
<CFSET fullname = "">
<CFSET f_name = "">
<CFSET l_name = "">
<!--- Loop through fieldnames --->
<CFLOOP INDEX="form_element" LIST="#FORM.fieldnames#">



<!--- Try to find current element in list --->
<CFIF ListFind(fieldnames_processed, form_element) IS 0>

<CFIF form_element IS "FIRSTNAME" OR form_element IS "LASTNAME">

<CFIF form_element IS "FIRSTNAME">
<CFSET form_element_qualified = "FORM." & form_element>
<CFSET f_name = Evaluate(form_element_qualified)>
<CFSET f_name = Left( UCase(f_name), 1 ) & Right( LCase(f_name), Len(f_name) - 1 )>
<CFSET fullname = fullname & f_name>

<CFELSE>
<CFSET form_element_qualified = "FORM." & form_element>
<CFSET l_name = Evaluate(form_element_qualified)>
<CFSET l_name = Left( UCase(l_name), 1 ) & Right( LCase(l_name), Len(l_name) - 1 )>
<CFSET fullname = fullname & " " & l_name>
</CFIF>
</CFIF>

<CFIF form_element IS "FIRSTNAME">
<CFSET message_body = message_body & "<BLOCKQUOTE>">
<CFELSEIF form_element IS "QUESTION">
<CFSET message_body = message_body & "</BLOCKQUOTE>">
</CFIF>


<CFIF form_element IS NOT "SUBMIT" AND form_element IS NOT "TIMEOFVISIT">
<CFIF form_element IS NOT "QUESTION">

<!--- Block for non-Question form elements --->
<!--- Make fully qualified copy of it (to prevent acessing the wrong field type) --->
<CFSET form_element_qualified = "FORM." & form_element>

<!--- Append it to message body --->

<!--- <CFSET message_body = message_body & form_element & ": " & Evaluate(form_element_qualified) & CRLF> #f_name# --->
<CFIF form_element IS "FIRSTNAME">
<CFSET message_body = message_body & "<b>" & Left( UCase(form_element), 1 ) & Right( LCase(form_element), Len(form_element) - 1 ) & "</b>: " & f_name & "<p>" & CRLF>
<CFELSEIF form_element IS "LASTNAME">

<CFSET message_body = message_body & "<b>" & Left( UCase(form_element), 1 ) & Right( LCase(form_element), Len(form_element) - 1 ) & "</b>: " & l_name & "<p>" & CRLF>

<CFELSE>

<CFSET message_body = message_body & "<b>" & Left( UCase(form_element), 1 ) & Right( LCase(form_element), Len(form_element) - 1 ) & "</b>: " & Evaluate(form_element_qualified)& "<p>" & CRLF>
</CFIF>

<!--- And add it to the processed list --->
<CFSET fieldnames_processed = ListAppend(fieldnames_processed, form_element)>

<CFELSE> <!--- Block for Question element --->

<!--- Make fully qualified copy of it (to prevent acessing the wrong field type) --->
<CFSET form_element_qualified = "FORM." & form_element>
<CFSET form_element_qualified = #Replace(form_element_qualified, '"', '/"', "ALL" )#>

<!--- Append it to message body --->

<!--- <CFSET message_body = message_body & form_element & ": " & Evaluate(form_element_qualified) & CRLF> --->

<CFSET message_body = message_body & "<hr color='blue' align='center' width='600'>" & "<b>" & fullname & "</b> wrote:<blockquote> " & ParagraphFormat(Evaluate(form_element_qualified)) & "</blockquote>" & "<hr color='blue' align='center' width='600'>" & CRLF>

<!--- And add it to the processed list --->
<CFSET fieldnames_processed = ListAppend(fieldnames_processed, form_element)>


</CFIF>
</CFIF>
<p>
</CFIF>

</CFLOOP> <!--- End of loop through fields --->

<!--- Build subject --->
<CFIF IsDefined("ATTRIBUTES.subject")>
<CFSET subject = ATTRIBUTES.subject>
<CFELSE>
<CFSET subject = "Form submission">
</CFIF>

<!--- Send mail message to Apologists [From the message_body variable above ]--->
<cfinclude template="ApologistEmail.cfm">

<!--- Send thank-you mail message to the questioner [From a CF_Mail Tag] --->
<cfinclude template="VisitorEmail.cfm">

<CFELSE>

<!--- Error occurred --->
<CFOUTPUT><H1>#error_message#</H1></CFOUTPUT>
<CFABORT>
</CFIF>
[/CODE]


AND [B]ApologistEmail.cfm[/B]

[CODE]
<CFMAIL FROM="#ATTRIBUTES.from#" TO="#ATTRIBUTES.to#" SUBJECT="#subject#" server="mail.cpats.org" type="html">
<img src="http://www.askacatholic.com/images/askacatholic_header.png" alt="AskACatholic.com Answering YOUR questions about the Faith Jesus founded on St. Peter and His successors." />
<p>
<font face="'Century Gothic',Georgia,Verdana,Arial" size="-1">
The following question was asked from the AskACatholic.com web site on #DayOfWeekAsString(DatePart('W',Now()))#, #DateFormat(Now(), "mmmm d, yyyy")# at #TimeFormat(Now())#:
<p>
<b>From:</b>
</p>
#message_body# <= once a " is encounter, in this text, the rest of the question gets cut off.
</p>
</font>
</CFMAIL>
[/CODE]


Any help would be appreciated.

Mike

[email][email protected][/email]
×

Success!

Help @Code_One spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...