alert in javascript not displaying the accents

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

alert in javascript not displaying the accents

S.Hage
Hi all,

   alert("${uiLabelMap.PartyFirstName}") in javascript not displaying the french accent correctly. The problem happen just when using map-name like uiLabelMap. If we put the accent directly in the alert then everything is fine, alert ("Prénom") display the accent char correctly.

OFBiz version 09.04

Any help is appreciated

Thanks in advance

SH.  
Reply | Threaded
Open this post in threaded view
|

Re: alert in javascript not displaying the accents

Jacques Le Roux
Administrator
Try this

hack = document.createElement('span');
hack.innerHTML="${uiLabelMap.PartyFirstName}";
alert(hack.innerHTML);
Jacques

From: "S. Hage" <[hidden email]>

>
> Hi all,
>
>   alert("${uiLabelMap.PartyFirstName}") in javascript not displaying the
> french accent correctly. The problem happen just when using map-name like
> uiLabelMap. If we put the accent directly in the alert then everything is
> fine, alert ("Prénom") display the accent char correctly.
>
> Any help is appreciated
>
> Thanks in advance
>
> SH.
> --
> View this message in context: http://www.nabble.com/alert-in-javascript-not-displaying-the-accents-tp24985114p24985114.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: alert in javascript not displaying the accents

S.Hage
Thank you Jacques, this work fine.


jacques.le.roux wrote
Try this

hack = document.createElement('span');
hack.innerHTML="${uiLabelMap.PartyFirstName}";
alert(hack.innerHTML);
Jacques

From: "S. Hage" <saad.hage@hotmail.com>
>
> Hi all,
>
>   alert("${uiLabelMap.PartyFirstName}") in javascript not displaying the
> french accent correctly. The problem happen just when using map-name like
> uiLabelMap. If we put the accent directly in the alert then everything is
> fine, alert ("Prénom") display the accent char correctly.
>
> Any help is appreciated
>
> Thanks in advance
>
> SH.
> --
> View this message in context: http://www.nabble.com/alert-in-javascript-not-displaying-the-accents-tp24985114p24985114.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>
>