I'm totally clueless how to accomplish this: PHP keep complaining about the "}" or an unespected $end.
The script gets loaded externally by a *.php page constructed out of smaller scripts.
Main idea is to parse JavaScript Variables to PHP or vice-versa, popping up a hint with a variable source. ("test.pop" here.)
In the page the script gets called by :
onClick="pop(<? $X = "test"; ?>)"
The Script:
<script language="JavaScript" type="text/JavaScript">
// "testing" <? $X = "test"; ?>
function pop(){
<?
$Path_X = "C:\wwwroot\"; // Set Base
$Path_EX = '.pop'; // Give extention
$Path_Whole = $Path_X . $X . $Path_EX; // Construct
$string = require($Path_whole); // Set stream from 'hint' file.
?>
alert('<? echo $string ?>'); // Open stream in alert()
}</script></head>