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

  1. <!---  This example shows the use of Len --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>
  7. Len Example
  8. </TITLE>
  9. </HEAD>
  10.  
  11. <BODY bgcolor=silver>
  12.  
  13. <H3>Len Example</H3>
  14.  
  15. <CFIF IsDefined("Form.MyText")>
  16. <!--- if len is 0, then err --->
  17.     <CFIF Len(form.myText) is not 0>
  18.         
  19.     <P>Your string, <CFOUTPUT>"#form.myText#"</CFOUTPUT>,
  20.     has <CFOUTPUT>#Len(form.myText)#</CFOUTPUT> characters.
  21.  
  22.  
  23.     <CFELSE>
  24.  
  25.     <P>Please enter a string of more than 0 characters.
  26.     </CFIF>
  27.  
  28.  
  29.  
  30. </CFIF>
  31.  
  32. <FORM ACTION="len.cfm" METHOD="POST">
  33. <P>Type in some text to see the length of your string.
  34.  
  35. <BR><INPUT TYPE="Text" NAME="MyText">
  36.  
  37. <BR><INPUT TYPE="Submit" NAME="Remove characters">
  38.  
  39. </FORM>
  40. </BODY>
  41. </HTML>       
  42.     
  43.