Anyone know how to include java script code in PHP? I have try it but the JavaScript code (in the head section) did’t function at all. Below is my code for testing on it,
######## START ########
<?php
echo”<html>”;
echo”<head>”;
echo”<!–paste in the head section of the page–>”;
echo”<SCRIPT language=”JavaScript”>”;
echo”<!– [url]http://www.spacegun.co.uk
echo”var message = “function disabled”; “;
echo” function rtclickcheck(keyp){ if (navigator.appName == “Netscape” && keyp.which ==”3″){ alert(message); return false; } “;
echo” if (navigator.appVersion.indexOf(“MSIE”) !=”-1″ && event.button ==”2″) { alert(message); return false; } } “;
echo” document.onmousedown = “rtclickcheck”;”;
echo”</SCRIPT>”;
echo”</head>”;
echo”<body>”;
echo”Right click me!!<br>”;
echo”<center><img src=”
echo”</body>”;
?>
####### END ###########
Thanks.