Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 826

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<cflayout type="vbox" name="layout1">
<cflayoutarea>
<h3>This area is not refreshed when the form is submitted.</h3>
<br />
</cflayoutarea>
<cflayoutarea>
<h3>This form is replaced by the action page</h3>
<cfform name="myform" format="html" action="showName.cfm">
<cfinput type = "Text" name = "name">
<cfinput type = "submit" name = "submit" value = "Enter name">
</cfform>
</cflayoutarea>
</cflayout>
</body>
</html>
In the following example, when you enter a name in the text input and click the Enter name button, the entered text
replaces the form on the page, but the rest of the page is not refreshed. This example shows the showName.cfm action page:
<cfif IsDefined("Form.name")>
<cfoutput>The Name is : <strong>#Form.name#</strong></cfoutput>
</cfif>
Using the cfajaxproxy SetForm function
The
function of the proxy object created by the
SetForm
arguments to the next CFC function that you call after the
of fields in a form to a CFC function, which can then do the necessary processing and return a result.
When you use the
SetForm
• The function does not need to specify the form fields in
passed by name.
• Form fields that have the same names as CFC arguments override the CFC argument values.
• If you do not specify form fields in the
when you use positional (array) notation to access them in the
• The
scope in the CFC function includes two fields that ColdFusion uses to control its behavior. These
arguments
fields are intended for internal use, and their names might change in future releases. Both field values are set to
:
true
tells ColdFusion not to return debugging output in the call response.
_CF_NODEBUG
tells ColdFusion to send a no cache header on the response, which prevents the browser from
_CF_NOCACHE
caching the response and ensures that every Ajax request results in a network call.
function, the following rules apply to the arguments in the called CFC function:
tags, they do not necessarily follow any declared arguments,
cfargument
Last updated 1/20/2012
tag causes the proxy to pass the form values as
cfajaxproxy
function. This way, you can pass the current values
SetForm
tags, and the function gets the field values
cfargument
structure.
arguments
821

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents