CFLib.org – Common Function Library Project

GetClientVariables()

Last updated January 30, 2003

author

Robert Segal

Version: 1 | Requires: CF5 | Library: UtilityLib

Description:
A structure with the client variable names as keys and the key values equal to the client variable values is returned when the function is called.

Return Values:
Returns a structure.

Example:

<!--- Demo disabled.
<CFAPPLICATION NAME="GetClientVarTest" CLIENTMANAGEMENT=1 CLIENTSTORAGE="Cookie">

<cfset client.a="bob">
<cfset client.b="sally">
<cfset thisst = getclientvariables()>
<cfdump var="#thisst#">
--->

Parameters:

No arguments.

Full UDF Source:

/**
 * Function returns a structure of client variable.
 * 
 * @return Returns a structure. 
 * @author Robert Segal (rsegal@figleaf.com) 
 * @version 1, January 30, 2003 
 */
function getclientvariables() {
 var lclientvarlist = getclientvariableslist();
 var stclientvar = structnew();
 var i = 1;
 for(i=1;i lte listlen(lclientvarlist);i=i+1)
 structinsert(stclientvar,"#listgetat(lclientvarlist,i)#",evaluate("client.#listgetat(lclientvarlist,i)#"));
 return stclientvar;
}

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson