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

  1. <!--- This example shows the use of RandRange --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>
  7. RandRange Example
  8. </TITLE>
  9. </HEAD>
  10.  
  11. <BODY bgcolor=silver>
  12.  
  13. <H3>RandRange Example</H3>
  14.  
  15. <P>RandRange returns an integer between two specified integers.
  16.  
  17. <CFIF IsDefined("form.myInt")>
  18.     <P>RandRange returned:
  19.         <CFOUTPUT>#RandRange("#form.myInt#", "#form.myInt2#")#</CFOUTPUT>
  20. </CFIF>
  21.  
  22. <CFFORM ACTION="randrange.cfm" METHOD="POST">
  23. <P>Enter the range:
  24. <CFINPUT TYPE="Text" NAME="MyInt" VALUE="1" RANGE="1,100000000" MESSAGE="Please enter a value between 1 and 100,000,000" VALIDATE="integer" REQUIRED="Yes">
  25. <CFINPUT TYPE="Text" NAME="MyInt2" VALUE="500" RANGE="1,100000000" MESSAGE="Please enter a value between 1 and 100,000,000" VALIDATE="integer" REQUIRED="Yes">
  26. <P><INPUT TYPE="Submit" NAME="">
  27.  
  28.  
  29. </CFFORM>
  30.  
  31.  
  32. </BODY>
  33.  
  34. </HTML>       
  35.