If you java script is in a .cfm page you can use CFtags inside the script to
generate the script output.  Use CFOUTPUT and wrap your URL var :

        #URLEncodedFormat(my_URLvar)#

When it writes out the javascript to the page it will be encoded correctly.


Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged


-----Original Message-----
From: Richard White [mailto:[email protected]] 
Sent: Tuesday, September 29, 2009 11:17 AM
To: cf-talk
Subject: Re: javascript / coldfusion ajax communication


does anyone have ideas?



> hi
> 
> our client side scripting is in javascript and server side code is 
> coldfusion.
> 
> our javascript sends string data to coldfusion via url. 
> 
> what is the best way to encode/escape the javascript strings and 
> decode/unescape them in coldfusion
> 
> thanks
> 
> richard 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326743
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to