Thanks Dave. Exactly what I was looking
for.
Ron Mast
Webmaster
Truth Hardware
Ph: 507-444-4748
Fx: 507-444-5361
www.truth.com
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Dave Shuck
Sent: Friday, September 30, 2005
1:53 PM
To: [email protected]
Subject: Re: passing text with
single quote as parameter
You might want to just
try escaping the single quote like this:
#replace(modifiedNotes,"'","\'","all")#
On 9/30/05, Ron Mast
<[EMAIL PROTECTED]> wrote:
Cool thanks!
Ron Mast
Webmaster
Truth Hardware
Ph: 507-444-4748
Fx: 507-444-5361
www.truth.com
Try replacing the single quote in the showNotes() call with
double quotes, and using single quotes to escape the onclick() content.
Alternatively you could use the replace() method to escape any single quotes
that are embedded in the string.
-----Original Message-----
From: Ron Mast [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 30, 2005
1:40 PM
To: [email protected]
Subject: RE: passing text with
single quote as parameter
I did that and it didn't work for me.
Inside the cfoutput tag I have the following cfset statement:
<cfset modifiedNotes = preserveSingleQuotes(theNotes)> before <a
href="" class="Notes" >modifiedNotes #','#divVar#');
frames['testiframe'].location.href = "" return
false"><div id="#divVar#"><strong>#mid(htmlcodeformat(theNotes),
1, 50)#...</strong></div></a>
Did I do something wrong?
Ron Mast
Webmaster
Truth Hardware
Ph: 507-444-4748
Fx: 507-444-5361
www.truth.com
If the quote is embedded in one of the variables you are
outputting, you could surround it with a call to preserveSingleQuotes() which
should give you the behavior you are looking for.
-----Original Message-----
From: Ron Mast [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 30, 2005
1:27 PM
To: [email protected]
Subject: passing text with single
quote as parameter
Hi
All,
I'm
passing text with a single quote in it as parameter to a _javascript_
function. Is there a way to pass the text with a single quote in it
without totally eliminating it using the replace function in CF?
Can
it be done on this line? <a href="" class="Notes"
id="#divVar#"><strong>#mid(modifiedNotes, 1,
50)#...</strong></div></a>
Thanks
in advance.
Ron Mast
Webmaster
Truth
Hardware
Ph:
507-444-4748
Fx:
507-444-5361
www.truth.com
_______________________________
This e-mail and any files transmitted with
it are confidential and are intended solely for the use of the individual to
whom they are addressed. If you are not the intended recipient or the
individual responsible for delivering the e-mail to the intended recipient,
please be advised that you have received this e-mail in error and that any use,
dissemination, forwarding, printing, or copying of this e-mail is strictly
prohibited.
CONFIDENTIALITY
NOTICE: The information contained in this e-mail and attached document(s) may
contain confidential information that is intended only for the addressee(s). If
you are not the intended recipient, you are hereby advised that any disclosure,
copying, distribution or the taking of any action in reliance upon the
information is prohibited. If you have received this e-mail in error, please
immediately notify the sender and delete it from your system.
--
~Dave Shuck
[EMAIL PROTECTED]
www.worldwildweb.biz
_______________________________
This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual to whom they are addressed. If you are not the intended recipient or the individual responsible for delivering the e-mail to the intended recipient, please be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.
|