打开对话框窗口后,我需要通过 ajax 显示表单。我试过了
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id' => 'register',
'actionPrefix' => 'register',
// additional javascript options for the dialog plugin
'options' => array(
'title' => 'registration',
'autoOpen' => false,
'width' => 800,
'height' => 500,
'buttons' => array(
'showform'=>'js:function(){
$.ajax({
type: "POST",
url : "' .$this->createUrl("/Site/Register"). '"
success:function(data){
$("#form-test").html(data);
}
})}'
),),));
但它不起作用。如何在 CJuiDialog 中设置回调函数