Use CF's JsStringFormat() ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com
-----Original Message----- From: David S. Neuman [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 9:08 PM To: CF-Talk Subject: RE: CF and JavaScript Here's a hangup that I am having. I'm dynamically outputting data into javascript, such as first and last names. Some of the last names in the database have apostrophe's in them, like O'neill, O'Connor, etc. How would I go about fixing the data so when the data is dynamically output, I don't run into javascript errors, because some of the data has the apostrophes? Here is the code: HINTS_ITEMS = { <cfloop query="fsisinfo"> #id#:wrap("#firstname# #MI# #lastname# #suffix#", true), #id#0:'<table cellpadding="5" cellpadding="5" style="border-bottom:1px solid black; border-top:1px solid black; border-right:1px solid black; border-left:1px solid black;"><tr><td nowrap="nowrap" align="left">#firstname# #mi# #lastname#</td></tr><tr><td nowrap="nowrap" align="left">#title#</td></tr><tr><td nowrap="nowrap" align="left">#address1#</td></tr><tr><td nowrap="nowrap" align="left">#address2#</td></tr><tr><td nowrap="nowrap" align="left">#city#, #state#</td></tr><tr><td nowrap="nowrap" align="left">#zip#</td></tr><tr><td nowrap="nowrap" align="left">Phone: #Left(phone, 3)# - #Mid(phone, 4,3)# - #Right(phone, 4)#</td></tr><tr><td nowrap="nowrap" align="left">Fax: #Left(fax, 3)# - #Mid(fax, 4,3)# - #Right(fax, 4)#</td></tr><tr><td nowrap="nowrap" align="left">#email#</td></tr></table>', </cfloop> }; Thanks, Dave -------------------------------------------------------- David S. Neuman Developer 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: http://www.ejhassociates.com tel: 651.717.4106 fax: 651.717.4116 mob: 952.239.3990 -------------------------------------------------------- This message contains confidential information and is intended only for [EMAIL PROTECTED] If you are not [email protected] you should not disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. David S. Neuman therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -------------------------------------------------------- -----Original Message----- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 5:31 PM To: CF-Talk Subject: RE: CF and JavaScript What are you trying to do? ....:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -----Original Message----- From: David S. Neuman [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 4:58 PM To: CF-Talk Subject: CF and JavaScript Hello, I have a question. Can you use cf tags inside of JavaScript? I'm trying to do something and it's not working quite right. Thanks -------------------------------------------------------- David S. Neuman Developer 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: http://www.ejhassociates.com tel: 651.717.4106 fax: 651.717.4116 mob: 952.239.3990 -------------------------------------------------------- This message contains confidential information and is intended only for [EMAIL PROTECTED] If you are not [email protected] you should not disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. David S. Neuman therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -------------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253339 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

