I have javascript function:
function someAction(thisTd,text){
alert(text);
thisTd.innerHTML=text;
...
}
And html-file:
<td onclick="someAction(this,<?echo 'Long-long text with <b>html-formatting</b>'?>)"/>
When I use such code function someAction doesn't call (because alert doesn't show) and in the error console in Opera no error is displayed. How to fix this problem?
P.S. I do not use frameworks(JQuery etc.).
UPDATE #1
When I use such code:
<?$encoded=str_replace("\n","",str_replace("\r\n","",$text));echo $encoded?>
It works nice. But I'm not sure, that it work correct in Linux.(I use Windows)