Railo 4.2 Reference
Choose a function:

Function TOSCRIPT

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

Beispiel

toscript(any cfvar,string javascriptvar,[boolean outputformat,[boolean ASFormat]]):string

Argumente

Die Argumente für diese Funktion sind fest vorgegeben. Ausser den nachfolgenden Argumenten dürfen keine weiteren verwendet werden.
Name Typ Required Beschreibung
cfvar any  Yes A variable.  
javascriptvar string  Yes A string that specifies the name of the JavaScript variable
that the ToScript function creates.  
outputformat boolean  No A Boolean value that determines whether to create
WDDX (JavaScript) or ActionScript style output for
structures and queries.
Default: true  
ASFormat boolean  No A Boolean value that specifies whether to use
ActionScript shortcuts in the script.
Default: false