I need show form via ajax after when the dialog window is opened.I tried this
$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);
}
})}'
),),));
but it doesn't work. How I can set callback function in CJuiDialog