ColdFusion MX: From Static to Dynamic in 10 Steps

Team-Fly    

ColdFusion® MX: From Static to Dynamic in 10 Steps

By Barry Moore

Table of Contents
The Next Step: Advanced ColdFusion Functionality

CFML is a complete web application language all on its own. However, ColdFusion also gives you a different method of using some ColdFusion functionality. This method is ColdFusion Script. ColdFusion Script is a scripting language similar in syntax to JavaScript, so developers who are proficient with JavaScript might find it to be a useful way to invoke ColdFusion functionality.

You can use ColdFusion Script to do things, such as set variable values, perform looping and conditional statements, and invoke objects. ColdFusion Script is used between opening and closing <CFSCRIPT> tags. The following code demonstrates how to create a structure using ColdFusion Script:

<CFSCRIPT> // create a structure and add a value stUserInfo = StructNew(); StructInsert(stUserInfo,"firstName", "Barry"); </CFSCRIPT> <CFOUTPUT>Hello, #stUserInfo.firstName#</CFOUTPUT>


    Team-Fly    
    Top
     

    Категории