Page is a not externally linkable
jatar_k - 4:47 pm on Jul 10, 2005 (gmt 0)
<? var exchRate = 1.20379; <?
I think script.php should look something like this
session_start();
if($allow_script)
{
header("Content-type: text/javascript");
?>
function getUSD(price) {
var USD = price * exchRate;
if (USD.toFixed) { // check whether the browser supports that method
USD = USD.toFixed(2); // (2 is the required number of decimals)
} else {
USD = Math.round(USD*100)/100; // less perfect for older browsers
}
USD = '<b>USD $' + USD + '<\/b>'; // concatenation. escape the slash after the <
document.write(USD); // write the result
}
$allow_script = false;
}
?>