Re: CF and JavaScript HELP - Maybe OT?
John, On 1/15/2004 at 10:07, you wrote: JG> I think I'll have to manually escape each special JG> character with JG> "ALL")> JG> Maybe you have a better solution? If CF4 supports replacelist(): mystring="foo to the bar"; lstbad="foo,bar"; lstgood="\foo,\bar"; mystring=replacelist(mystring,lstbad,lstgood); This is probably not a very efficient approach if your code is heavily trafficked, but nothing else comes to mind... ~ Ubqtous ~ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF and JavaScript HELP - Maybe OT?
Forgot to mention we're stuck in CF 4.0, but thanks for the response. Nice to know someone cares ; ). I think I'll have to manually escape each special character with Maybe you have a better solution? John -Original Message- From: Ubqtous [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 9:50 PM To: CF-Talk Subject: Re: CF and _javascript_ HELP - Maybe OT? John, On Wednesday, January 14, 2004, 4:34:22 PM, you wrote: JG> Everything works fine until I get a non alpha-numeric character, JG> i.e., ".", """, "'", "/", "&", "(", ")", in the #WholeName# JG> variable. Then, _javascript_ bombs and returns an error: "error JG> expected ';'". JG> Can someone help me with handling regular expressions in JG> _javascript_, so the above code will accept special characters in JG> the name? Grateful doesn't begin to describe how I'll feel. Perhaps JSStringFormat() would help? ~ Ubqtous ~ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: CF and JavaScript HELP - Maybe OT?
John, On Wednesday, January 14, 2004, 4:34:22 PM, you wrote: JG> Everything works fine until I get a non alpha-numeric character, JG> i.e., ".", """, "'", "/", "&", "(", ")", in the #WholeName# JG> variable. Then, _javascript_ bombs and returns an error: "error JG> expected ';'". JG> Can someone help me with handling regular expressions in JG> _javascript_, so the above code will accept special characters in JG> the name? Grateful doesn't begin to describe how I'll feel. Perhaps JSStringFormat() would help? ~ Ubqtous ~ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]