1

エラーを確認するには: http://jsfiddle.net/sEdGz/2/

//スクリプトは機能しますが、クリックされたラジオはチェックされていません=チェックされています//mysqlとphpはうまく機能します

$('#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"/>
... 

私はこれを取得したい:

$('#form1').find('.divtoclick').live("click", .....
$('input#form1').live("change", .....

誰でも私を助けることができますか?どうも

4

1 に答える 1

1

理由はあなたreturn falseです。

これはうまくいきます:

$('#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
    });    
});
于 2010-07-26T10:52:09.163 に答える