home *** CD-ROM | disk | FTP | other *** search
- <!--- This example shows ParameterExists --->
-
- <HTML>
-
- <HEAD>
- <TITLE>
- ParameterExists Example
- </TITLE>
- </HEAD>
-
- <BASEFONT FACE="Arial, Helvetica" SIZE=2>
- <BODY bgcolor="#FFFFD5">
-
- <H3>ParameterExists Example</H3>
-
- <CFIF ParameterExists(form.myString)>
- <P>Using ParameterExists, we have shown that the form
- field "myString" now exists. However, this function is
- provided for backward compatibility with Cold Fusion 2.0 and
- the function IsDefined should be used instead, as below.
-
-
- </CFIF>
-
- <CFIF IsDefined("form.myString")>
- <P>Because the variable form.myString has been defined, we
- can now show its contents. This construction allows us
- to place a form and its resulting action template in the same
- template, while using IsDefined to control the
- flow of template execution.
- <P>The value of "form.myString" is <B><I><CFOUTPUT>#form.myString#</CFOUTPUT></I></B>
-
- <CFELSE>
- <P>During the first time through this template, the variable
- "form.myString" has not yet been defined, so we
- are not attempting to evaluate it.
- </CFIF>
-
-
- <FORM ACTION="parameterexists.cfm" METHOD="POST">
-
- <INPUT TYPE="Text" NAME="MyString" VALUE="My sample value">
-
-
- <INPUT TYPE="Submit" NAME="">
-
- </FORM>
-
- </BODY>
-
- </HTML>
-
-
-