Cjuidialog Won't Start

Dear all,

My Dialog won’t start. I always get an error and it opens the next view normal. Anybody ?

– edited after comment of zaccaria (added a file instead) –

Trying to start a dialog opendetailCreateDialoog using CJuiDialog widget when user clicks on link.

But when user clicks on the link no dialog starts. It uses the defined array(’/leveringDetail/create’,‘levering’=>$model->levering) to open the view create in normal mode instead of Dialog mode (with current view in background).

Question : Why and how to solve ?

Been searching for it for a day or 2 now. But trying to implement the suggested tips & tricks on the Net will not fix my problem :(

JS function :

function opendetailCreateDialoog(url)

{

dialogUrl=url;


jQuery.ajax({'url':url ,'success':function (data){


			$('#detailCreateDialogContent').html(data);


			$('#detailCreateDialog').dialog('open');


		},'cache':false});

}

Link user has to click :

echo CHtml::link(‘Nieuw Detail’, array(’/leveringDetail/create’,‘levering’=>$model->levering),

	array('onclick'=>'opendetailCreateDialoog(\''.CHtml::normalizeUrl(array('/leveringDetail/create','levering'=>$model->levering)).'\');return false;',


	));

Widget :

$this->beginWidget(‘zii.widgets.jui.CJuiDialog’, array(

'id'=>'detailCreateDialog',


// additional javascript options for the dialog plugin


'options'=>array(


    'title'=>'Nieuw detail',


    'autoOpen'=>false,


    'modal'=>true,


    'resizable'=>false,


    'width'=>500,


	),


));


echo '<div id="detailCreateDialogContent"></div>';

$this->endWidget(‘zii.widgets.jui.CJuiDialog’);

I’ll not read all this code.

Can you be more specific about what are you trying to do and what is the error?

Hi,

Please add js: in onclick method call.

js:opendetailCreateDialoog

Please can you check the ajax URL.

Are you getting any error in browser?

Thanks

chandran nepolean