![]() |
Price Quote Generator - re-re-visited
Hi all. I hope that everyone is fine and doing well.
This is something of an annual visit for me. You guys helped me enormously with the code below. It is a price quote generator that takes a number (entered by the client) and depending on the package selected, produces a price quote. As I said, it works really well, but it's time for me to expand my business overseas. At the moment, I display the price as a single currency, but I would like for clients to be able to select (maybe from a drop down list in the answer field) any one of 4 different currencies (i.e., GBP, USD, EURO, MYR). The different exchange rates don't need to be up to the minute accurate. I'm quite happy to go in to the code and update them weekly or as required. I have attempted to research different ways of doing this, but as my needs are quite unusual and my brain really can't wrap around the ins and outs of java script, i'm here again begging with my cap in hand for help. To see this code in action as it stands, please go to www.grammarproofing.com Code:
<head>Code:
<body>Regards as always, Phil |
This is a real easy one
1. Define a variable for the exchange rates (indexed 0 to x) 2. Provide a select drop down for the currencies (values 0 to x) 3. add an onchange event listener to the new select and point to the same function as used for your current select 4. Change the calculation to take the exchange rate into consideration Code:
var exchangeRates = [1, 0.889, 1.234];Code:
<body> |
Spectacular devnull69, it works like a charm.
I love the way you say "This is a real easy one" :thumbsup: Thanks again, Phil |
| All times are GMT +1. The time now is 09:41 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.