Adding More Variables To The Application; Development Considerations - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

14

Adding More Variables to the Application

Applications can use many different variables. For example, the
application page can set and display values for department, city, and salary.
To modify the application:
1.
Return to the file
2.
Modify the code so that it appears as follows:
<HTML>
<HEAD>
<TITLE>Call Department</TITLE>
</HEAD>
<BODY>
<STRONG>Call Department</STRONG>
4
<!--- Set all variables --->
<CFSET Department="Sales">
4
<CFSET City="Boston">
4
<CFSET Salary="110000"
4
<!--- Display results --->
<CFOUTPUT>
4
I'd like to talk to someone in #Department# in #city# who earns at
least #Salary#.
</CFOUTPUT>
</BODY>
</HTML>
3.
Save the file.
4.
View the page in your Web browser by entering the following URL:
http://127.0.0.1/myapps/calldept.cfm

Development Considerations

The same development rules that apply for any programming environment apply to
ColdFusion. You should also follow the same programming conventions that you
would with any other language:
Comment your code as you go.
HTML comments use this syntax:
CFML comments add an extra dash:
File names should be all one word, begin with a letter and can contain only
letters, numbers and the underscore.
File names should not contain special characters.
Developing Web Applications with ColdFusion
in ColdFusion Studio,
calldept.cfm
<!-- html comment -->
<!--- cfml comment --->
calldept.cfm

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 4.5

Table of Contents