I had the similar requirement as that stated in the cookbook
CJuiDialog and AjaxSubmitButton
and it works fine for me.
Now i had created two dialog boxes in the header of my site. The two dialog boxes have the same syntax as mentioned in Cjuidialog documentation. The syntax that I have used is:
$this->beginWidget(‘zii.widgets.jui.CJuiDialog’, array(
'id'=>'mydialog',
// additional javascript options for the dialog plugin
'options'=>array(
'title'=>'Dialog box 1',
'autoOpen'=>false,
),
));
echo 'dialog content here';
$this->endWidget(‘zii.widgets.jui.CJuiDialog’);
// the link that may open the dialog
echo CHtml::link(‘open dialog’, ‘#’, array(
‘onclick’=>’$("#mydialog").dialog(“open”); return false;’,
));
Now the problem arises when I comes in a page where both of these links are there i.e The links created with the help of cookbook and these dialog boxes in the header.
When I click on the dialog boxes then they appear but when i click once on the link created with the help of cookbook then the dialog boxes in the header stops appearing on the page.The dialog box that I created with the help of cookbook are working totally fine but the dialog boxes in the header are not coming once I click on the ajaxlink…
Anyone has any idea whats causing the problem… I have spent a lot of time on this but no luck…
Any help is highly appreciated…
Regards