0
以及我有它的ajaxsubmitbutton的部分形式,它的工作正常,但如果我試圖部分渲染另一個形式與另一個ajaxsubmitbutton,甚至添加另一個提交按鈕下的表單它不起作用。 這裏是我的ajaxbutton代碼: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;});
});