to see the error: http://jsfiddle.net/sEdGz/2/
//the script works, but the clicked radio isn't checked=checked //mysql and php works good
$('#form1').live("click change", function() { ....
<div class='divtoclick'>neu berechnen</div>
<form id="form1" method="post" name="bestellformular">
<input value="101" name="flyer_anzahl" type="radio" /> 1.000
<input name="flyer_anzahl" type="radio" value="102" checked="checked"/>
...
I want to get this:
$('#form1').find('.div开发者_运维技巧toclick').live("click", .....
$('input#form1').live("change", .....
Can anybody help me? thx
The reason is your return false
.
This will work:
$('#form1').live("click change", function() {
$.ajax({
type : "POST",
cache : false,
url : "berechnung_ajax.php",
data : $(this).serializeArray(),
success : function(data) {
$('#berechnung').html(data);
}});
return true; // return true in order not to prevent the event
});
});
精彩评论