This will allow your customers to select from a list of predefined amounts or select other and enter an amount.
<script> function getamount() { var radioAmount = document.epayform.RadioAmount.value ; var otherAmount = document.epayform.OtherAmount.value ; if(radioAmount =='other'){ if(isNaN(otherAmount)|| otherAmount ==0){ alert("Please enter an Amount."); return false } else{ var total = otherAmount; } } else{ var total = radioAmount; } document.epayform.UMamount.value = total ; return true; } </script>
<tr> <td bgcolor="#F0F0F0" width="234" align="right"><font size="2" face="Verdana">Payment Amount:</font></td> <td bgcolor="#F0F0F0" width="450"> <input type="radio" name="RadioAmount" value="10.00" checked="checked"> $10<br /> <input type="radio" name="RadioAmount" value="40.00"> $40<br /> <input type="radio" name="RadioAmount" value="100.00"> $100<br /> <input type="radio" name="RadioAmount" value="other"> <input name="OtherAmount" type="text" size=10><br /> </td> </tr>
<input type="submit" name="submitbutton" value="Process Payment >>">
<input type="submit" name="submitbutton" value="Process Payment >>" onclick="return getamount();">