Hi
I have this code which works fantastically.
Code:
<script type="text/javascript">
exchRate = 1.3;
function getUSD(price) {
document.write('(' + price * exchRate + ' €)');
}
</script>
<p>Price: £1.40 <script type="text/javascript"> getUSD('1.4'); </script></p>
However, it will require someone changing the exchange rate manually as it changes. So my first question is this... Is there any way I can grab the latest exchange rate from a 3rd party??
Secondly, I need to display the converted price rounded to 2 decimal places. I'm sure I'll be able to work this one out with a little searching around, but any help would be appreciated.
Many thanks.