Forum Moderators: coopster
Here's my question:
All the lines in javascript normally end with a ';' but the php echo always ends in a ';' too.the javascript ';' means the end of the line and so does the php.
do I do both ';'? or just php's... I am so confused!
thanks,
electricocean
echo "<script language=\"javascript\">";
echo "var w = window.open('',$title,'width=500,height=500,scrollbars=yes,resizable=yes');";
echo "var d = w.document;"
echo "d.write('<html><head>$title</head><body>DKicks Jokes / Jokes / $genre / $title<br>
<p align=\"center\"><table><tr><td><font size=\"30\">$title</font></td><td>Current Rating: $rating <input type=\"button\" value=\"Rate This Joke\" onclick=\"return rateJoke('$jtitle');\">
</td></tr></table></p><p align=\"center\">$joke</p><br><p align=\"right\"><a href=\"javascript:window.close();\"><<Back</a></body></html>');";
echo "d.close();"
echo "w.focus();"
echo "</script>";
echo "<script type=\"text/javascript\">
<!--
var a = 2;
var b = $bla;
var c = a + b;
document.write('Sum: ' + c);
//-->
</script>";
Then it's quite clear what's javascrip and what's php.
Best regards
Michal Cibor