I have tried multiple ways to get result but i am unable to do so .. I am quite new in Javascript ..
For an example:
User input value "5" in "results2". Upon clicking the SGD button, I want the value in input to be change to the new value which will be UserInput * SGDRate .
This is my HTML code
<p class="heading">
This is a currencry converter for Singapore To Malaysia Currency </P>
<form name="currency">
<input type="text" name="results2">
<input type="button" value=SGD name="SGD" onclick="displayConversion(SGD.value)">
<input type="button" value="Please Click to find what is the latest Rate" name="help" onclick = "rates()">
</form>
As for my Javascript file
I know that I need to create another function but I am unsure where do I start.
var SGDrate = 2.92;
var convertrate = inputUser * SGDrate;
function displayConversion(n1)
{
currency.results2.value=n1;
}