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

  1. <!--- This example shows the Max and Min
  2. of two numbers --->
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>
  7. Min Example
  8. </TITLE>
  9. </HEAD>
  10.  
  11. <BODY bgcolor=silver>
  12.  
  13. <H3>Min Example</H3>
  14. <CFIF IsDefined("form.myNum1")>
  15.  
  16.     <CFIF IsNumeric(form.myNum1) and IsNumeric(form.myNum2)>
  17.     <P>The maximum of the two numbers is <CFOUTPUT>#Max("#form.myNum1#", "#form.myNum2#")#</CFOUTPUT>    
  18.     <P>The minimum of the two numbers is <CFOUTPUT>#Min("#form.myNum1#", "#form.myNum2#")#</CFOUTPUT>    
  19.  
  20.     <CFELSE>
  21.     <P>Please enter two numbers
  22.     </CFIF>
  23.  
  24.  
  25.  
  26. </CFIF>
  27.  
  28.  
  29. <FORM ACTION="min.cfm" METHOD="POST">
  30. <H3>Enter two numbers, and see the maximum
  31. and minimum of the two numbers</H3>
  32.  
  33. Number 1 <INPUT TYPE="Text" NAME="MyNum1">
  34. <BR>Number 2 <INPUT TYPE="Text" NAME="MyNum2">
  35.  
  36. <BR><INPUT TYPE="Submit" NAME="" VALUE="See results">
  37. </FORM>
  38.  
  39.  
  40. </BODY>
  41.  
  42. </HTML>       
  43.