22.08.2013 Views

ColdFusion Developer's Guide

ColdFusion Developer's Guide

ColdFusion Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta<br />

■ The cftextarea control has a rich text editor option. The text editor is configurable<br />

■ The cfinput supports a datefield type in HTML format with an AJAX-based pop-up<br />

calendar from which user can select the date.<br />

■ The cfinput tag with text type supports an autosuggest attribute that lets you<br />

dynamically supply a drop-down list of field completions based on the current user input.<br />

■ The HTML format cfinput, cfselect, and cftextarea tags support a tooltip<br />

attribute that specifies a pop-up tool tip to display when the user moves the mouse over<br />

the control. The cftooltip tag displays a tool over any region of a page, not just a form<br />

control.<br />

Using AJAX form controls<br />

<strong>ColdFusion</strong> AJAX-based form controls provide two major features that affect how you<br />

develop your application:<br />

■ Data binding lets you dynamically get and update control contents.<br />

■ You can submit a form without refreshing the entire page with the action page.<br />

This section describes ways you can submit AJAX forms. For a detailed discussion of data<br />

binding, see “Binding data to form fields” on page 930.<br />

Using AJAX containers for submission<br />

The simplest way to submit a form without refreshing the entire page is to put the form inside<br />

a cfdiv, cflayout, cfpod, or cfwindow tag. In this case, when a user submits the form, any<br />

output from the action page replaces the body of the container tag that encloses the form on<br />

the current page, as the following example shows. The submitSimple.cfm page has the<br />

following contents:<br />

<br />

<br />

<br />

<br />

<br />

<br />

This area is not refreshed when the form is submitted.<br />

<br />

<br />

<br />

This form is replaced by the action page<br />

<br />

<br />

<br />

900 Using AJAX UI Components and Features

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!