I have a credit card payment form in which I need to automatically calculate 2% of an entered payment value, show that calculated value in its own field and also show the total payment value including the 2% in a third field.
This problem is beyond my very basic knowledge of jQuery. Is someone able to help me with a script to achieve the required outcome?
Living in hope
Peter
I have included a block diagramme below to help explain the process as well as an excerpt with the relevant markup, taken from the payment form.
Paymenta value in dollars is entered here
2% Merchant Feethe merchant fee is automatically calculated and shown here
Amount After Feesthe total payment including merchant fee shows here
<tr> <td> </td> <td align="right"><b><i>Payment Amount </i></b></td> <td><input type="text" name="vpc_Amount" value="" size="20" maxlength="10"><b><i> ($AUD)</i></b></td> </tr> <tr> <td colspan="1"></td> <td colspan="1"></td> <td colspan="1" style="padding-top: .7em; padding-right: 7em"><i>NB. Payment by credit card (as above) will attract a 2% merchant fee which is imposed by our bank. By completing this transaction you hereby acknowledge and accept that this fee will be added to the payment amount above.</i></td> </tr> <tr> <td colspan="3"> </td></tr> <tr> <td> </td> <td align="right"><b><i>Merchant Fee </i></b></td> <td><input type="text" name="vpc_Amount" value="" size="20" maxlength="10"><b><i> ($AUD)</i></b></td> </tr> <tr> <td colspan="3"> </td></tr> <tr> <td> </td> <td align="right"><b><i>Amount After Fees </i></b></td> <td><input type="text" name="vpc_Amount" value="" size="20" maxlength="10"><b><i> ($AUD)</i></b></td> </tr>
I am trying to implement the accordion in jquery-ui-1.10.3 and I require the height of each panel to match its respective content.
However, using the heightStyle option, as seen below, has no effect on the height of the panels.
In fact, substituting either of the others possible values ('auto', 'fill') to the heightStyle option has no effect either - all panels appear to take their height from the first panel.