Hi,
In a view, I have a dialog box -hidden- which should pop up with contents that are loaded with an ajax call.
I use the following code:
print CHtml::ajaxLink('select circles', array('ajax/circle.CircleSelector'),
array(
'update'=>'#entityCircleSelectAjax',
),
array(
'onclick'=>'$("#mydialog").dialog("open"); return false;',
// 'onmouseup'=>'$("#mydialog").dialog("open"); return false;',
)
);
Problem is it does not work; only the dialog pop up works and ajax part doesn’t. Seems to me that the CHtml::ajaxLink sets the onclick property of the link for ajax call first, and my onclick code overrides it. If it change the event from onclick to something else -onmouseup, for example- both will work fine.
Do you have any suggestion for solving this problem?