I have a problem with a condition statement with 4 fields involved
- Issuing country select field [ Select field ]
- Currency of the amount to be paid [ Select Field ]
-
Conversion of the amount entered [ Input Field ]
//if "AUS" is selected auto-select AUD as currency and run the second function to the amt_input field <select name="issuing_country" id="issuing_country"> <option value=""> -- Please Select --</option> <option id="ARG" value="ARG">Argentina</option> <option id="USA" value="ARM">Armenia</option> <option id="ABW" value="ABW">Aruba</option> <option id="AUS" value="AUS">Australia</option> <select> //Select a currency: <tr class="shade"> <td align="left">Currency: </td> <td> <select name="vpc_Currency"> <option value="USD">USD</option> <option value ="AUD" selected>AUD</option> </select> </td> </tr>
//where to enter the amount//
<input type="text" name="amt" value="">
//field that will reflect the computation//
<input id="Total_Amount" name="vpc_Amount" value=""/> //Javascript// <script type="text/javascript"> function ().call(){ var amt; function.do{
//if USD is selected to be converted to AUD in the amt field//
if (vpc_Currency = "USD")&&(AUS) var amount = (usd * 1.36) * 1.023; return amount;
//if AUD currency and issuing bank is AUS//
else if (vpc_Currency = "AUD")&&(loc='AUS') var amount = [(aud * 1.023) * 1.1] return amount;
//if different country and bank automatic select USD as currency//
else (aud * 1.023); return amount; } }
Aucun commentaire:
Enregistrer un commentaire