To properly escape characters in JavaScript, use the jsStringFormat() 
function in CF.

e.g.

var aJSVar = "#jsStringFormat('"Hello There"')#";

will give you:

var aJSVar = "\"Hello There\"";


----- Original Message -----
From: Charlie <[EMAIL PROTECTED]>
Date: Thursday, June 20, 2002 10:03 am
Subject: replace double quotes - syntax help

> all these tough questions and heady subjects, here's an easy one i 
> hope
> I am attempting to remove all instances of double quotes within 
> string, and this seems be incorrect syntax
> 
> 
> #REReplace("myQuery.myField", " "  " , "" , "ALL")#
> 
> additionaly, the reason i need to remove the double quotes is that 
> they are causing a javascript error....it is okay with my client 
> that for this particular item, that the double quotes are omitted, 
> but IS there a way to preserve them without causing the javascript 
> to fail
> 
> 
> 
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to