How to pass words which contains special character (as Réservation) in javascript in ASP.NET
-
Hi I am developing an application in ASP.NET USING c#. In that , I am using javascript for on mouse-over on my icon and showing some message.But these messages are in french like Réservation. So here is special character as `. So it gives me error in javascript as UnTerminated String. Please let me know if any body knows solution. Swapnil Bhavsar
-
Hi I am developing an application in ASP.NET USING c#. In that , I am using javascript for on mouse-over on my icon and showing some message.But these messages are in french like Réservation. So here is special character as `. So it gives me error in javascript as UnTerminated String. Please let me know if any body knows solution. Swapnil Bhavsar
Place a \ sign in front
var msg; msg = 'Please enter \'Some Text\' here';
.: I love it when a plan comes together :. http://www.zonderpunt.nl
-
Hi I am developing an application in ASP.NET USING c#. In that , I am using javascript for on mouse-over on my icon and showing some message.But these messages are in french like Réservation. So here is special character as `. So it gives me error in javascript as UnTerminated String. Please let me know if any body knows solution. Swapnil Bhavsar
I think the document charset needs to be like Unicode right. I have encountered similar issues using ALT+145 (
æ
) character in .JS file. But the same works from .ASPX page. :mad: :)Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
Place a \ sign in front
var msg; msg = 'Please enter \'Some Text\' here';
.: I love it when a plan comes together :. http://www.zonderpunt.nl
No. I don't think it is that straight-forward. Some characters are blocked in .JS file. They work from .ASPX page. Check out the other reply I have given to the asker, whose permalink is here: http://www.codeproject.com/script/comments/forums.asp?msg=2134086&forumid=12076#xx2134086xx[^]
Vasudevan Deepak Kumar Personal Homepage Tech Gossips