Wednesday, May 21, 2008

ToScript or not ToScript

Nice little function in CF 7 that I totally overlooked: 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.

Returns

A string that contains a JavaScript or ActionScript variable definition corresponding to the specified ColdFusion variable value.

This can contain one of the following:
  • String
  • Number
  • Array
  • Structure
  • Query
Very useful when assigning cf data to javascript - nice to know now?!

1 comment:

Anonymous said...

Ok I don't have to much experience in Java applications or how work, but this is because I prefer to work with Generic Viagra2.5. is more light and easy to use.