Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 749

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Validation technique
mask
(
attribute)
mask
onBlur
(
attribute)
validateat="onBlur"
onSubmit
(
validateat="onSubmit"
attribute)
onServer
(
validateat="onServer"
attribute)
hidden field
JavaScript
(
onValidate ="function"
attribute)
Applies to
Where and when
performed
HTML and Flash format
On the client as the
tags
user enters data
cfinput
cfinput
and
On the client when the
cftextarea
tags
data field loses focus
cfinput
and
On the client when the
cftextarea
tags
user clicks Submit
cfinput
and
On the server when
cftextarea tags
ColdFusion gets the
submitted form
All Forms, including
On the server when
HTML-only forms
ColdFusion gets the
submitted form
,
,
On the client, when the
cfgrid
cfinput
,
user clicks Submit,
cfslider
, and
before field-specific
cftextarea
tags in HTML
onSubmit validation
cftree
and XML format forms
Last updated 1/20/2012
Description
ColdFusion generates JavaScript or ActionScript
to directly control the data a user enters by
specifying a pattern. For example, 999-999-9999
requires a user to enter ten digits, and
automatically fills in the dash (-) separators to
create a formatted telephone number.
For detailed information on using masks, see
"Handling invalid
data" on page 750.
In HTML and XML format, ColdFusion generates
JavaScript that runs on the browser to check
whether entered data is valid and provide
immediate feedback, if the entry is invalid.
In Flash format, uses Flash built-in validation
routines.
In HTML or XML format, the validation logic is
identical to onBlur validation, but the test is not
done until the user submits the form.
In Flash format, this validation type is identical to
onBlur Validation. Flash checks do not
differentiate between the two events for
validation.
ColdFusion checks submitted data for validity and
runs a validation error page if the data is not valid.
You can use the
cferror
tag to specify the
validation error page.
ColdFusion uses the same validation logic as with
onServer validation, but you must create
additional, hidden, fields and you can use this
technique with HTML tags or CFML tags.
For detailed information on using hidden fields,
see
"Validating form data using hidden
page 755.
ColdFusion includes the specified JavaScript
function in the HTML page it sends to the browser,
and the browser calls it.
For detailed information on using JavaScript for
validation, see
"Validating form input and
handling errors with
JavaScript" on page 759.
744
fields" on

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents