Macromedia ColdFusion 5 Training from the Source (With CD-ROM)
| I l @ ve RuBoard |
<CFPARAM>
Used to test for a parameter's existence and data type, and to assign a default value if one does not exist. Syntax
<cfparam name="name_of_parameter" type="data_type_of_parameter" default="default_value_of_parameter"> Attributes
Name: The name of the parameter to check the existence of. If the Default attribute is not present and the parameter does not exist, an error is returned. Type: Optional. This specifies the type of parameter that is being tested for. Default is any. The following types are valid: any, array, binary, Boolean, date, numeric, query, string, struct, UUID, and variablename. Returns an error if the variable being tested isn't of the type specified. Default: Optional. The default value to give to the parameter if one does not exist. Example
<!--- Check for the form value mailinglist ---> <cfparam name="form.mailinglist" default="0"> |
| I l @ ve RuBoard |