in this code I pass a PHP var to javascrip to display it in a div element. When the string in less than 50 char it works nice but when it is a little bit longen it crashes. here is my code:
$sql3 = "SELECT * FROM $table2 WHERE id = '$newsId'";
$result3 = mysql_query($sql3);
$thisNews = mysql_fetch_array($result3);
?>
newsContent = "<? echo $thisNews['news']; ?>";
newsDiv = "<div class='newsBox'>";
newsDiv += "<div class='newsTitle'><? echo $rowArray[$i]['title']; ?></div>";
newsDiv += "<div class='newsBody'>"+newsContent+"</div>";
newsDiv += "<div class='newsFoot'>autor: <? echo $thisNews['author']; ?> - <? echo $thisNews['site']; ?> - <? echo $thisNews['source']; ?></div>";
box.append(newsDiv);