ecco il codice:
$t = "
<script type=\"text/javascript\">
function carica_corpo_mail()
{
valore = document.getElementById(\"$nomeSelect\").options[document.getElementById(\"$nomeSelect\").selectedI ndex].value;
if (valore == 1)
{ valore = \"".getCorpoMail(1)."\" }
if (valore == 2)
{ valore = \"".getCorpoMail(2)."\" }
if (valore == 3)
{ valore = \"".getCorpoMail(3)."\" }
document.getElementById(\"$nomeTextArea\").value = valore;
}
</script>
";
return $t;
dalla funzione mi ritorno una stringa contentente la mail... ma come mai se nella mail metto \n s'inceppa js dicendomi che la stringa è unterminated?
mi serve il \n per mettere il testo in una textarea...
c'è un modo per kmettere l'accapo nella textarea senza che s'incazzi js?
grazie![]()