こんにちは私のプロジェクトを開発しています。私はどのようにonclickボタンのためのajax関数を呼び出しますか?これで混乱ラジオボタンで数値の値を表示する方法
If(isset($_POST) && ($_POST[‘GET_PAYMENT’] == ‘1’))
{
$totalAmount = $_POST[‘GET_PAYMENT’]; //Total amount
$checkbox_id = $_POST[‘VALUE’]; // The radio button value
/* Here get the amount values (3,5.5 or 10) from
Database based on the $checkbox_id and store it in
$amount variable*/
$total_amount = $amount + $totalAmount;
Echo $total_amount;
}
$.ajax({
type: "POST",
url: "ajax.php",
data: "GET_PAYMENT=1&VALUE=”+ checkboxVal,
success: function(total_amount)
{
//Assigning the final value to the hidden value here
$(‘#totalamount’).val(total_amount);
//Here changing the display of total amount
$(‘#repair_total_amount’).html(“Total <span class="repair-finalamount-txt">£ ”+ total_amount+”</span>”);
}
});
}
イム:data: "GET_PAYMENT=1&VALUE=”+ checkboxVal
、私はgive.thisに持っているアクションは、私は、ラジオボタン、それはaddcart awith追加されることをクリックしたときのためです。
は、いずれかの
これは非常によく知られています。あなたはマグナですか? :) http://stackoverflow.com/questions/4537799/radio-button-value-for-add –
@スピルノーマン、いいえ....確かに宇宙の一致は... – acm