Well - that was an uncontested 5 suggestions for jsStringFormat() - and 
it worked wonderfully. How did that little function escape me so long.

My toughest decision is now do I go back through old project cleaning up 
my nutty replace functions I previously dreamed up and replace with 
jsStringFormat() ! :)

Thanks everyone - I knew posting to the list would help.
jay miller

charlie griefer wrote:
> there is a jsStringFormat() function which will escape the 'dangerous' 
> javascript characters :) 
> 
> hth,
> charlie 
> 
> Jason Miller writes: 
> 
> 
>>Hello list -
>>I have an access database - it already has text in a  memo field riddled 
>>with ' quotes. Like - "Woman's" and "it's" and all sorts of words. 
>>
>>Problem is it is creating an issue with my javascript event - which is
>>onMouseOver="tip.show('#Trim(LinkDesc)#')" 
>>
>>Do I need to do a replace function each time? Or do I have to run a 
>>filter on all existing fields and re-insert the info with a 
>>PreserveSingleQuotes? 
>>
>>It throws cf errors on page rendered - it explains a mystery -
>>"Expected )" issue. Also - it prevents any tip's from showing that have 
>>a single quote.
>>I tested it to be sure this was the problem and in the mouseover - 
>>temporarily changed it to urlencodedformat and it fixed all issues.. but 
>>obviously for readability -that's not a solution. 
>>
>>What's the best, quickest and easiest way to go here? Advice? I tried a 
>>few things but nothing worked for me 100% or was effective (not spaghetti) 
>>
>>thanks!
>>jay 
>>
>>
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to