ARTICLES & TUTORIALS FOR COLDFUSION DEVELOPMENT: A Collection of Links to Coldfusion Strings Tutorials, including topics such as Generating Random Strings, Concatenating Strings, Query Strings, Encrypted Strings, and Data Structures.
Related Tutorials - Coldfusion Variables
Coldfusion strings - I have had similar problems when using WebDNA (tag based server side scripting language). I had to grep the variable before it was sent to the browser. Just use regular expressions to replace " with \" and ' with \'. you may not need to do both. it depends on what your wrapping the js var with ( var txt ="hi" or var txt ='hi' ).
Generating Random Strings With ColdFusion - Here's an interesting little bit. You can download the CF_RandomPassword custom tag from the ColdFusion Scripts section, but I though I’d write a brief article to explain what it does and show how to use and get ASCII character values in ColdFusion.
Strings - Strings can be any length, limited by the amount of available memory on the ColdFusion server. However, the default size limit for long text retrieval (CLOB) is 64K. The ColdFusion MX Administrator lets you increase the limit for database string transfers, but doing so can reduce server performance. To change the limit, select the Enable retrieval of long text option on the Advanced Settings page for the data source.
Concatenating strings - Query of Queries support two string concatenation operators: + and ||, as the following examples show
Flash, ColdFusion, and a query string - This is a simple tutorial showing a way to get a query string into a flash movie. The query string is passed from a hyperlink to the .cfm page, and then into the swf using the CFOUTPUT tag. The query string is then available for display within the swf.
ColdFusion: Strings Unintentionally Interpreted as DateTime Values in Comparisons. - Short strings not meant to be "DateTime" values may be evaluated as "DateTime" values in string comparisons. Here's a workaround
Coldfusion Strings Tutorials - Handling encrypted strings to avoid instability - In ColdFusion 4.0.x, the Encrypt() and Decrypt() functions can be used to encrypt and decrypt string values. However, if a string is encrypted using Encrypt(), then modified and passed to the Decrypt() function, ColdFusion Server may generate a protection fault
ColdFusion, Strings, Masks and Filters - In your last example, you have the input value of a phone number with an extension. The returned output, while nicely formatting the phone number into a recognized format for US numbers, loses the extension. Also, what about non-US phone numbers where the format is not (nnn) nnn-nnnn
Strings Unintentionally Interpreted as DateTime Values in Comparisons - Short strings not meant to be "DateTime" values may be evaluated as "DateTime" values in string comparisons. Here's a workaround
ColdFusion Data Structures Lists - This is an article which guides the users about maintaining the lists using coldfusion. This tutorial tells the users how to manipulate the lists with built-in functions support. This tutorial provide information to the users that they can handle any string as a list and can manipulate any lists as a string.
Strings - In ColdFusion, text values are stored in strings. You specify strings by enclosing them in either single- or double-quotation marks. For example, the following two strings are equivalent:
Related Tutorials - Coldfusion Variables