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

toScript Argument Reference

cfvar
Required

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

javascriptvar
Required

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

outputformat
Default: YES

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

asformat
Default: NO

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

Fork me on GitHub