【发布时间】:2012-02-16 11:43:58
【问题描述】:
好吧,我确实有带有 ajaxsubmitbutton 的部分表单并且它工作正常,但是如果我尝试使用另一个 ajaxsubmitbutton 部分呈现另一个表单,或者甚至在该表单下添加另一个提交按钮,它就不起作用。 这是我的 ajaxbutton 代码:
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;});
});
【问题讨论】:
标签: jquery ajax yii submit-button