variable in cold fusion

 

 

 
 

 

Variable in cold fusion  - Editor B L RajaSrinivas

 

  • Creating Variables
  • Kinds of Variables
  • Client Variables
  • Server Variables
  • Session Variables

Creating Variables

The basic HTML pages usually begin and end with a tag. Even ColdFusion the pages begin and end with a tag. As variables in other languages, the ColdFusion variable is assigned a value. In ColdFusion applications, the variables are used in many different ways. In a simple way the variables, which are used in ColdFusion forms, are to hold data submitted in an application. Variables are essential for each field in a form to handle the form inputs.   Each set of beginning and end tags always has the same name but the end tag name is preceded by a slash (/).  ColdFusion code displays the dynamic information such as date but in case of HTML the dynamic information such as date cannot be displayed.

Kinds of Variables

Local:               Variables created with the CFSET tag or CFPARAM tag in a template

URL:                Variables reflecting parameters appended to a URL

CGI:                 Variables reflecting the CGI environment variables of the context of the requested template.      

Cookie:            Variables reflecting cookies passed to the template by the requesting browser. (CFCOOKIE tag is used)

Query:              Variables reflecting the results of a query.

Form:               Variables reflecting the values of the fields in a form submitted to the current template

Client:               Validation used to associate data with a specific client.

Server:             Validation used to associate data with a specific Web Server.

Session:            Validation used to associate data with a specific client Session.

Application:      Validation used to associate data with a specific ColdFusion Application.

Client Variables

Client Variables keep track of users as they move through the pages.  A client record is created for each browser that requests a page in an application in which client state management is enabled. CFID and CFTOKEN identify the client’s unique record, which is stored in an HTTP cookie in the user’s browser.  Within the client record the application define the variables. These client variables are accessible as parameters in every page, which is requested by the client.

To Create client variables CFAPPLICATION tag is used as

<CFAPPLICATION Name = “myappl”

            ClientManagement=”yes”>

This statement is written in the .cfm file.

Server Variables

The Server Variables are always tied with single Web server and can be accessed by all clients and application on that server.  The Server variable is stored in the server’s RAM until the server has been stopped. The server variable is lost only when the server is shutdown.  The server variable is used when you want to create a client variable that can be accessed by any client connecting to the server.

Session Variables

The Session Variables are associated with a single client. Timeout period is specified and are stored in the server’s RAM.  The default timeout period is 20 minutes, which is set in CF Administrator. The session variables are used for short period. Once the variables are expired, each time the user returns using the same client, their session variables must be re-established.  It is better to keep the expiration date for session variables to a minimum since the server’s RAM limits them.

List of Tags

Form Tags

 

CFAPPLET

CFGRIDROW

CFSLIDER

CFFORM

CFGRIDUPDATE

CFTEXTINPUT

CFGRID

CFINPUT

CFTREE

CFGRIDCOLUMN

CFSELECT

CFTREEITEM

DATABASE MANIPULATION TAGS

CFINSERT

CFQUERYPARAM

CFPROCPARAM

CFSTOREDPROC

CFPROCRESULT

CFTRANSACTION

CFQUERY

CFUPDATE

DATA OUTPUT TAGS

CFCOL

CFOUTPUT

CFCONTENT

CFPROCESSINGDIRECTIVE

CFLOG

CFTABLE

EXCEPTION HANDLING TAGS

CFERROR

CFRETHROW

CFTHROW

CFTRY CFCATCH

EXTENSIBILITY TAGS

CFCOLLECTION

CFREPORT

CFEXECUTE

CFSEARCH

CFGRAPH

CFSERVLET

CFINDEX

CFSERVLETPARAM

CFOBJECT

CFWDDX

FILE MANAGEMENT TAGS

CFDIRECTORY

CFFILE

FLOW-CONTROL TAGS

CFABORT

CFLOOP

CFBREAK

CFRETHROW

CFEXECUTE

CFSWITCH    CFCASE    CFDEFAULTCASE

CFEXIT

CFTHROW

CFIF    CFELSEIF    CFELSE

CFTRY CFCATCH

CFLOCATION

 

INTERNET PROTOCOL TAGS

CFFTP

CFMAIL

CFHTTP

CFMAILPARAM

CFHTTPPARAM

CFPOP

CFLDAP

 

 

JAVA SERVLET AND JAVA OBJECT TAGS

CFOBJECT

CFSERVLET

CFSERVLETPARAM

PAGE PROCESSING TAGS

CFCACHE

CFINCLUDE

CFFLUSH

CFSETTING

CFHEADER

CFSILENT

CFHTMLHEAD

 

VARIABLE MANIPULATION TAGS

CFCOOKIE

CFSAVECONTENT

CFDUMP

CFSCHEDULE

CFPARAM

CFSET

CFREGISTRY

 

WEB APPLICATION FRAMEWORK TAGS

CFAPPLICATION

CFLOCK

CFASSOCIATE

CFMODULE

CFAUTHENTICATE

CFSCRIPT

CFIMPERSONATE

 

 

 

Cold fusion index
what is cold fusion    cold fusion servers     cold fusion web hosting
cold fusion tutorial     variable in cold fusion

 
   

cold fusion  ~ Editor B L RajaSrinivas
copyright data 2004 Indianchild.com                         
HOME

 

Copyright 2004.Indianchild.com.All rights reserved. No Content from our pages can be used /copied /downloaded for any use/publication/website in whatsoever manner without our written permission. We take action on infringement. Category editors disclaim responsibility for suggestions and recommendations. We are not representing or affiliated with products or sites reviewed.