toScript

Creates a JavaScript or ActionScript expression that
assigns the value of a ColdFusion variable to a JavaScript
or ActionScript variable. This function can convert
ColdFusion strings, numbers, arrays, structures, and
queries to JavaScript or ActionScript syntax that defines
equivalent variables and values.

toScript(cfvar, javascriptvar [, outputformat] [, asformat]) → returns String

Argument Reference for the toScript function

cfvar

Required: Yes
A ColdFusion variable. This can contain one of the following:
String, Number, Array, Structure or Query.

javascriptvar

Required: Yes
A string that specifies the name of the JavaScript variable
that the toScript function creates.

outputformat

Required: No
Default: YES
A Boolean value that determines whether to create
WDDX (JavaScript) or ActionScript style output for
structures and queries.
Default: true

asformat

Required: No
Default: NO
A Boolean value that specifies whether to use
ActionScript shortcuts in the script.
Default: false


Fork me on GitHub