MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 16

Developing coldfusion mx applications
Table of Contents

Advertisement

Requiring users to enter values in form fields . . . . . . . . . . . . . . . . . . . . . . . . . 566
Form variable notes and considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
Working with queries and data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
Using HTML tables to display query results . . . . . . . . . . . . . . . . . . . . . . . . . . 567
Formatting individual data items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Building flexible search interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Returning results to the user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
Handling no query results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
Returning results incrementally . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572
Dynamically populating list boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
list boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
Check boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
Multiple selection lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
Validating form field data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
Creating forms with the cfform tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
Using HTML and cfform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
The cfform controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
Preserving input data with preservedata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585
Browser considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585
Building tree controls with cftree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
Grouping output from a query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
The cftree form variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
Input validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
Structuring tree controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590
Image names in a cftree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
Embedding URLs in a cftree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
Specifying the tree item in the URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
Building drop-down list boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
Building text input boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
Building slider bar controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
Creating data grids with cfgrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
Working with a data grid and entering data . . . . . . . . . . . . . . . . . . . . . . . . . . 596
Creating an editable grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
Embedding Java applets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
Registering a Java applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
Using cfapplet to embed an applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Handling form variables from an applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Input validation with cfform controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Validating with regular expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610
Input validation with JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Handling failed validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
Example: validating an e-mail address. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
16
Contents
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents