. // Tell browser output is JavaScript header ('Content-Type: application/javascript'); // Do some standard HashOver setup work require ('nocache-headers.php'); require ('standard-setup.php'); // Setup class autoloader setup_autoloader (function ($error) { // Construct JavaScript code to display error $js_error = 'var hashover = document.getElementById (\'hashover\') || document.body;' . PHP_EOL; $js_error .= 'var error = \'
HashOver: ' . $error . '
\';' . PHP_EOL . PHP_EOL; $js_error .= 'hashover.innerHTML += error;'; // Display JavaScript code echo $js_error; });