I have an error when I POST to a page. Whatever monetary choice of donation that is made, the POST does not work to send the values to the next page and the default value of $20.00 is registered. After looking at my code for a day I don’t see the error so I am hoping that someone else’s eyes can see it. Here is the code
[code]
<div id='pageHeader'>FURI Donation</div>
<div id='fSeparator'> </div>
<br />
<br />
<p class="paragraph">
Contributions are tax deductible for residents of the United States and Jamaica .
</p>
<br />
<p class="paragraph">
Yes, I want to become a contributor. Please accept my donation as indicated below.
(Contributions in $US only; please check one):
</p>
<br /> <br />
<div id="donationForm">
<form id="formDonate" method ='post' action='content/creditCardAuthorize.php'>
<fieldset id="fieldDonate">
<legend>Donation Form</legend> <br />
<p><input type='radio' id="donation10" name='donation' value='10' /> $10</p>
<p><input type='radio' id="donation20" name='donation' value='20' checked /> $20 </p>
<p><input type='radio' id="donation30" name='donation' value='30' /> $30 </p>
<p><input type='radio' id="donation40" name='donation' value='40' /> $40 </p>
<p><input type='radio' id="donation50" name='donation' value='50' /> $50 </p>
<p><input type='radio' id="donation75" name='donation' value='75' /> $75 </p>
<p><input type='radio' id="donation100" name='donation' value='100' /> $100</p>
<p><input type='radio' id="donationvalue" name='donation' value='' /> Other Amount </p>
<br />
<p>
<label for='amount'>Amount $</label> <input type='text' name='amount' id='amount' value="20"/>
<span id="errmsg" style="color: red;"> </span>
</p>
<p class='submit'><input type='submit' id="donateButton" value='Continue' /></p>
<br />
</fieldset>
</form>
</div>
<script type="text/javascript">
$("input:radio[@name='donation']").change(function(){
$("#amount, :text").val( $('input[name=donation]:checked').val());
if(document.formDonate.donation[7].selected){
document.formDonate.amount.disabled = false;
document.formDonate.amount.focus();
}
else{
document.formDonate.amount.disabled = true;
}
});
$("input:radio[name='donation']").click(function() {
$("#amount").val($(this).val()).attr("disabled", "disabled");
if($(this).val() == ""){
$("#amount").attr("disabled", "").focus();
}
})
$("#amount").keypress(function (e){
//if the letter is not digit then display error and don't type anything
if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57)){
//display error message
$("#errmsg").html("Digits Only").show().fadeOut(1000);
return false;
}
});
$("form#formDonate").submit(function (event) {
// this is critical!
event.preventDefault();
$('#rightContent').html(ajax_load);
$.ajax({
type: 'POST',
url: 'content/creditCardAuthorize.php',
data: {
amount: $('#amount').val(),
description: $('#donation').val()
},
success: function(html){
$('#rightContent').html(html);
},
dataType: 'html'
});
});
</script>
[/code]
Here is the test site.
For this test all menu choices takes to the Donation page.
Thanks for any help.
WBR