I have a CTreeView, I want to do a different action according to the element has been clicked, but how can I intercept this event?
I see that CtreeView is a list with <UL> <LI> <LI>… So I think I should insert the event "onclick" foreach <LI>
but how can I do it in CTreeView?
In DropDownList I can specify in htmloptions differents options for example:
dropDownList ($name, $select, $data, $htmlOptions=array ( 'options'=>'value1'=>array('onclick'=>'xxxx'), 'value2'=>array('onclick'=>'yyyy')))
For CtreeView I tried this solution but it seems not possible.
$this->widget('CTreeView',array('data'=>$data,'animated'=>'fast','collapsed'=>true, 'htmlOptions'=>array('onclick'=>'if (indexclicked==xxxx)...')));
if (this.options[this.selectedIndex])=='xxxx' ...
there is a similar syntax for UL list?