home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / stripcr.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  864 b   |  44 lines

  1. <!--- This example shows StripCR --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>
  7. StripCR Example
  8. </TITLE>
  9. </HEAD>
  10.  
  11. <BODY bgcolor=silver>
  12.  
  13. <H3>StripCR Example</H3>
  14.  
  15. <P>Function StripCR is useful for preformatted HTML
  16. display of data (PRE) entered into TEXTAREA fields.
  17.  
  18. <CFIF IsDefined("form.myTextArea")>
  19.  
  20. <PRE>
  21. <CFOUTPUT>#StripCR(form.myTextArea)#</CFOUTPUT>
  22. </PRE>
  23.  
  24.  
  25.  
  26. </CFIF>
  27.  
  28. <!--- use #Chr(10)##Chr(13)# to simulate a line feed/carriage
  29. return combination; i.e, a return --->
  30. <FORM ACTION="stripcr.cfm" METHOD="POST">
  31. <TEXTAREA NAME="MyTextArea" COLS="35" ROWS=8>
  32. This is sample text and you see how it scrolls<CFOUTPUT>#Chr(10)##Chr(13)#</CFOUTPUT>
  33. From one line <CFOUTPUT>#Chr(10)##Chr(13)##Chr(10)##Chr(13)#</CFOUTPUT> to the next
  34. </TEXTAREA>
  35.  
  36. <INPUT TYPE="Submit" NAME="show me the html version">
  37. </FORM>
  38.  
  39.  
  40.  
  41. </BODY>
  42.  
  43. </HTML>       
  44.