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 />

Submit form<br />

<br />

<br />

The asynchFormHandler.cfm page consists of a single line, as follows:<br />

Echo: #form.mytext1# #form.mytext2#<br />

Using the <strong>ColdFusion</strong>.navigate function to submit a form<br />

The <strong>ColdFusion</strong>.navigate JavaScript function can submit a form to a URL and have the<br />

returned output appear in a specified container control, such as a cfdiv, cflayout, cfpod, or<br />

cfwindow tag. This function has two features:<br />

■ It lets you populate a control other than the one that contains the form when the user<br />

submits the data.<br />

■ It lets you submit the form asynchronously when a user performs an action, such as<br />

clicking on a menu item, outside the form.<br />

Using HTML format grids<br />

The <strong>ColdFusion</strong> HTML format cfgrid control lets you use a bind expression to dynamically<br />

populate the grid. HTML format grids that use bind expresstions are paged; as users navigate<br />

from page to page of the grid, the grid dynamically gets the data for only the required page<br />

from the data source. You also use bind expressions when you let users edit form contents, and<br />

other <strong>ColdFusion</strong> controls can bind to the grid. In addition, HTML format grids provide<br />

several JavaScript functions that you can use to manage and manipulate the grids.<br />

You can also create a static HTML format grid by specifying a cfgrid tag that does not use a<br />

bind expression. With static grids, all data is initially available.<br />

Dynamically filling form data<br />

HTML format forms have a bind attribute that uses a bind expression to dynamically fill the<br />

form data. The bind expression uses bind parameters to specify dynamic information<br />

provided by the grid and can also use bind parameters to specify the values of any other form<br />

field attributes. This section provides grid-specific binding information only. For detailed<br />

information on binding in general and bind parameter formats and their use, see Chapter 34,<br />

“Using AJAX Data and Development Features” in CFML Reference.<br />

Using AJAX form controls and features 905

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

Saved successfully!

Ooh no, something went wrong!