legendgod Posted July 1, 2004 Posted July 1, 2004 I have a javascript which pop-up a box when mouseover a specific object. The pop-up box will show up the text(or string) pass in. Since Javascript treat ('), (") and (\) as special character. Therefore I use following: strNote = Replace(DV(i).Item("schNote"), "\", "\\") to fix up the string before pass in to the Javascript function. The pop-up box show properly. However, the strNote = Replace(DV(i).Item("schNote"), "\", "\\") cannot handle ("). How should I modify it to make it right? Many thanks. Quote http://blog.legendgod.com
PWNettle Posted July 1, 2004 Posted July 1, 2004 If I understand you correctly you're wanting to "encode" double quotes in strings within your VB.Net code to the proper escape sequences for javascript. If this is, in fact, what you want to do try something like: strNote = Replace(DV(i).Item("schNote"), """", "\""") Paul Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.