7 Years
Discussion Span
Last Post by aizel

Making the converter can be done in JavaScript, like you showed on the link you added. I'il give you a head start on how to:

You have two text inputs, I already made the first for you:

The currency you have: <select id='have_cur_type' onchange='NewHaveCurType(this.value)'><option value='euro'>Euro</option><option value='dollar'>Dollar</option></select><br />
The amount you have: <input type='text' id='have_cur_amount' value='0' />
<br />
<br />
<input type='button' onclick='Convert()' value='Convert Currency' />

And then you have the javascript:

var have_cur_type = 'euro';
var need_cur_type = 'euro';

function NewHaveCurType(type) {
  have_cur_type = type;

function Convert() {
  var have_cur_amount = document.getElementById('have_cur_amount').value;
  // Also retrieve the other...
  // Now you need to calculate the ratio from one currency to the other, I would advise if you would first translate them all to one currency for example dollars and then translate those into the final currency the user wants




nice guide sir..how to put the answer to the currency i want amount textbox sir?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.