I have a webpage with photos and when you select some photos, you can click a link and an email is generated with the number of the photos.
In this javascript file I would like to add special characters (like é or ñ), but this is not accepted.
1 if (c==0) {
2 bodytxt="Seleccionar ……";
3 for (j=1;j<=num_maillinks;j++) {
4 el="maillink" + j;
5 document.getElementById(el).innerHTML=bodytxt;
6 }
7 } else {
8 if (c==1) {
9 msg="(Anada …" + "\n\n" + "Hay " + c + " foto mirado.\n\n";
10 ni='para mirar esta foto';
11 } else {
12 msg="(Anada …" + "\n\n" + "Hay " + c + " fotos mirados.\n\n";
13 ni='para nirar estas ' + c + ' fotos'
14 }
15 bodytxt=msg + txt + "\n"+ "Fecha mirado: " + now + "\n" + actie + "\n\n";
16 bodytxt=escape(bodytxt);
line 2 is text on the webpage and here a special character is accepted
line 9-16 is the output for the email message. When I change in line 9 Anade for Añade (Añade), then there is no more text after A.
What is the trick to add special characters in javascript?
Thanks
In this javascript file I would like to add special characters (like é or ñ), but this is not accepted.
1 if (c==0) {
2 bodytxt="Seleccionar ……";
3 for (j=1;j<=num_maillinks;j++) {
4 el="maillink" + j;
5 document.getElementById(el).innerHTML=bodytxt;
6 }
7 } else {
8 if (c==1) {
9 msg="(Anada …" + "\n\n" + "Hay " + c + " foto mirado.\n\n";
10 ni='para mirar esta foto';
11 } else {
12 msg="(Anada …" + "\n\n" + "Hay " + c + " fotos mirados.\n\n";
13 ni='para nirar estas ' + c + ' fotos'
14 }
15 bodytxt=msg + txt + "\n"+ "Fecha mirado: " + now + "\n" + actie + "\n\n";
16 bodytxt=escape(bodytxt);
line 2 is text on the webpage and here a special character is accepted
line 9-16 is the output for the email message. When I change in line 9 Anade for Añade (Añade), then there is no more text after A.
What is the trick to add special characters in javascript?
Thanks