www.webdeveloper.com
Results 1 to 6 of 6

Thread: preventing text clipping in Textarea

  1. #1

    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

  2. #2
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    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....
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  3. #3

    Jona like this:

    --------------->(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
    Last edited by Code One; 03-05-2003 at 09:43 PM.

  4. #4
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    <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.
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  5. #5

    Thanks anyway

    Jonah,
    thanks for trying

  6. #6
    Join Date
    May 2003
    Location
    Natick, MA
    Posts
    6

    I can explain what is going on. I have the same bug.

    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...ion_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...n_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>
    AND ApologistEmail.cfm

    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>
    Any help would be appreciated.

    Mike
    mike.humphrey@rcn.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles