I have the following
I have a ajaxButton in a form view so when I press this ajax button the following autocomplete code should load
$this->widget('CAutoComplete',
array(
'name'=>'booking[set_id2]',
'value'=>'',
'url'=>array('booking/autoCompleteLookupSets'),
'max'=>10,
'minChars'=>1,
'delay'=>500,
'matchCase'=>false,
'methodChain'=>".result(function(event,item){\$(\"#booking_set_id2\").val(item[1]);})",
));
This however loads but somehow the autocomplete funtion does not work, if I paste this widget directly in the view it works, now I can’t understand why the autocomplete does not want to work when I click on the button and only the text box appears? Am I doing something wrong?