Richard, I think you will want those newlines to be actually kept in the javascript, rather than interpreted as a newline at runtime. Maybe you could escape it, something like this:
<cfset newstring = rereplace(oldstring, "\r\n", "\\r\\n", "all")> I bet if you futz around with that a bit, it might get you a bit closer. -- Josh ----- Original Message ----- From: "Richard White" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Friday, November 30, 2007 3:26 PM Subject: Unterminated string literal > Hi, > > i am using mysql to store data. > > i have a text area on a page and have noticed that if someone adds text > then presses enter at the very end without adding any more text, mysql > saves it ok but then when i try to use that text in javascript it produces > an error saying unterminated string literal. > > has anyone else noticed this problem and have any ideas how i can get > around it? > > thanks for any help > > richard > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294038 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

