I have a charity page which includes an option to add an additional donation. The donor must check the checkbox then add the amount in a text field for it to be added. But it appears some are overlooking the checkbox when adding the amount in the text field, and so the additional donation is not being included.
Here is the HTML code I have--
<input alt="Additional Donation" id="other_donation_check" onclick="UpdateCost()"
type="checkbox" value="on" />
I would like to make an (additional) <em><strong>tax-deductible</strong></em>
donation of $<input id="other_donation_amount" name="other_donation_amount"
onblur="UpdateCost()" onchange="UpdateCost()" onclick="UpdateCost()"
onfocus="UpdateCost()" size="8" type="text" />
What can I add to the code that checks the checkbox if any amount is added to the text field?
Try:
Fiddle: http://jsfiddle.net/jzz0sapc/