Hi,
I have the following form on a webpage:
<FORM NAME="formMagOrder" ACTION="PaypalManageCart.h
tml" onSubmit="AddToCart(this);
">
<table width="528" border="0">
<tr>
<td>Payment Currency </td>
<td><label>
<select name="select">
<option value="GBP">GB Pounds</option>
<option value="Euro">Euros</option
>
<option value="USD">US Dollars</option>
</select>
</label></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="99">Number required </td>
<td width="293">Select type of subscription required </td>
<td width="114"><div align="center">Total</div>
</td>
</tr>
<tr>
<td><div align="center">
<input type="text" name="QUANTITY" id="QUANTITY" size="4"
onKeyUp="ChangePrice(this.
form.SubTy
pe)">
</div></td>
<td><select name="SubType" onChange="ChangePrice(this
)">
<!--NB DO NOT REPLACE '£' WITH & AS THIS INTERFERES WITH OPERATION OF ChangePrice()-->
<option value="UK">Faith Magazine: UK/N Ireland @ £22.00</option>
<option value="MSubEur">Faith Magazine:Europe(incl Eire) @ £25.00</option>
<option value="MSubSur">Faith Magazine:Surface Overseas @ £24.00</option>
<option value="MSubAml">Faith Magazine:Airmail Overseas @ £29.00</option>
<option value="MSubStu">Faith Magazine:Student Rate @ £15.00</option>
<option value="MSubSam">Faith Magazine:Sample Copy @ £4.50</option>
</select></td>
<td><div align="center">
<input type="text" name="totalPounds" id="totalPounds" size="10">
</div></td>
</tr>
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<input name="PRICE" type="hidden" id="PRICE">
<input name="ID_NUM" type="hidden" id="ID_NUM">
<input name="NAME" type="hidden" id="NAME">
<input name="SHIPPING" type="hidden" id="SHIPPING" value="0">
<br>
<input type="image" src="SubscribeNowUp.gif" value="Add To Cart" alt="Add To Cart">
</form>
As you can see the first listbox contains a list of currencies and the second one contains a list of products (types of subscription). Each of the product listings contains a currency value at the end of the string.
What I would like to do is,
a) when the user selects a currency in the first listbox, a "lookup" is done for the current rate of exchange between the GB Pound value and the appropriate currency and the strings in the second listbox are then altered to display the appropriate values in the currency selected.
b) this page has its action set to another form "paypalmanagecart.html". paypalmanagecart.html has another form on it whose action is set to "paypalcheckout.html" and there is a form on that page which has a hidden field <INPUT type="hidden" value="GBP" name="currency_code"> for passing the currency to Paypal. If I want to change that in tune with the currency selected, I assume the only way would be to have THREE sets of pages for each currency
i) PaypalmanagecartGBP.html, paypalcheckoutGBP.html
ii) PaypalmanagecartEURO.html,
paypalcheckoutEURO.html
III) PaypalmanagecartUSD.html, paypalcheckoutUSD.html
but I will then have to change the action of the form on the first page to call up the appropriate page, depending on the currency selected.
How can I do that, os is there a simpler way of doing it?
How can I do that?
Start Free Trial