Currency conversion

Hello guys,
I need to know the Currency conversion code in Javascript
Say for example i got 2 textbox .. where i enter a number (singapore doller value) and i provide a button and in the next text box i should get the value in US doller value.

Waiting for ur response,

Ciao,
Jay
[308 byte] By [jayender.vs] at [2007-11-19 23:51:20]
# 1 Re: Currency conversion
I am assuming that you know that they are converted with use of multipliers you store for each currency. Are you looking for something like Online convertor which uses latest currency rates ?
Krishnaa at 2007-11-8 0:40:43 >
# 2 Re: Currency conversion
I am assuming that you know that they are converted with use of multipliers you store for each currency. Are you looking for something like Online convertor which uses latest currency rates ?Well thats nice to see ur reply Krishna,
here is an example : converter (http://dynamicconverter.com/) , see here : if u click the currency u will get " Select Currency " combo box .. where u can change the type of currency u need and it automaticall changes the currency ...
hope i made it clear this time ,...
jayender.vs at 2007-11-8 0:41:38 >
# 3 Re: Currency conversion
The actual conversion is very simple, you just hide the price in a hidden input, and then use a multiplier with a selection menu.

Here is your problem...you will have to update the currency changes every day that they change unless you plan to somehow parse it.

<script language="JavaScript">
function doconvert(to){
var ctrl = document.getElementById('price_us');
var newprice = ctrl.value * to;
alert(newprice);
}
</script>

<input type="hidden" id="price_us" value="9.95">
<select onchange="doconvert(this.value)">
<option value="1">USD</option>
<option value="0.792733">Euro</option>
<option value="3.24120">Peruvian Sol</option>
</select>
PeejAvery at 2007-11-8 0:42:46 >