I have to fill in a textarea and I'm using the function .val () of Jquery, when there is text in a line there is no problem, but having 2 lines gives "Unexpected EOF" syntax error in jquery line 349 .
what could it be?
the data are lame from mysql and are in utf8_general_ci format
the code is this:
$('#art_detalles').val('<?=$DMoarticulos["detalles"]; ?>');
and the html code this:
<tr>
<td class="derecha_listados"><label>Detalles:</label></td>
<td class="izquierda_listados"><textarea id="art_detalles" name="art_detalles"></textarea></td>
</tr>
If I put a console.log with the php variable it gives this error: SyntaxError: Unexpected identifier 'and' also on line 349 of jquery And it's the first character after the line break.
with var_dump I get this message:
string(14) "ola
y k ase"
Is there any way to force it to read the content of the variable as if it were html?