0
私はそのajaxsubmitbuttonで部分的なフォームを持っていますが、問題なく動作しますが、別のajaxsubmitbuttonを使って別のフォームを部分的にレンダリングしようとした場合、 。その理由は、アクションが削除されるようにyii複数のajaxがCActiveFormのボタンを送信する
echo CHtml::ajaxSubmitButton(
'Delete', array(
'submit' => $this->createUrl('logInOfficeEmp/delete', array('id' => $model->id)),
'type' => 'POST',
), array('type' => 'post',), array('id' => 'deletesubmit',));
をなっていたかもしれないので:
jQuery('body').undelegate('#deletesubmit','click').delegate('#deletesubmit','click',function(){jQuery.ajax({'type':'POST','url':'/mySystem/index.php?r=logInOfficeEmp/update&id=159', 'cache':false,'data':jQuery(this).parents("form").serialize()});return false;});
});