User Guide

Table Of Contents
8 Contents
CHAPTER 25: Using Verity Search Expressions . . . . . . . . . . . . . . . . . . . . . . . . 581
About Verity query types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581
Using simple queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
Using explicit queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
Using natural queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
Using Internet queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
Composing search expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
Refining your searches with zones and fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
PART V: Requesting and Presenting Information
CHAPTER 26: Introduction to Retrieving and Formatting Data . . . . . . . . . . . . . 609
Using forms in ColdFusion MX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Working with action pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Working with queries and data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
Returning results to the user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Dynamically populating list boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
Creating dynamic check boxes and multiple-selection list boxes . . . . . . . . . . . . . 627
CHAPTER 27: Building Dynamic Forms with cfform Tags. . . . . . . . . . . . . . . . . 631
Creating custom forms with the cfform tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
Building tree controls with the cftree tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
Building drop-down list boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
Building slider bar controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
Creating data grids with the cfgrid tag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
Embedding Java applets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
CHAPTER 28: Validating Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
About ColdFusion MX validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
Validating form fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667
Handling invalid data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
Masking form input values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
Validating form data with regular expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
Validating form data using hidden fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
Validating form input and handling errors with JavaScript . . . . . . . . . . . . . . . . . 680
Validating data with the IsValid function and the cfparam tag . . . . . . . . . . . . . . . 683
CHAPTER 29: Creating Forms in Macromedia Flash. . . . . . . . . . . . . . . . . . . . . 687
About Flash forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
Building Flash forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
Binding data in Flash forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
Setting styles and skins in Flash forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700
Using ActionScript in Flash forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
Best practices for Flash forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707