I have CJuiAutoComplete below, and when I boot, I want to display βSearchβ in the text box and on click I want to clear. I tried using the "value" in the parameters, but could not get it to work. Thanks for your help.
tried also
'htmlOptions'=>array('value'=>'Search',)
<?php $this->widget('zii.widgets.jui.CJuiAutoComplete', array( 'name'=>'test1', 'source'=>'js: function(request, response) { $.ajax({ url: "'.$this->createUrl('myAutoComplete/autoCompleate').'", dataType: "json", data: { term: request.term, brand: $("#type").val() }, success: function (data) { response(data); } }) }', 'options' => array( 'showAnim' => 'fold', 'select' => 'js:function(event, ui){ alert(ui.item.value) }', 'click'=>'js:function( event, ui ) { alert("test"); return false; }', ), 'htmlOptions'=>array('value'=>'Search',) )); ?>
Hi
UPDATE
direct "value" => "search" worked.
Click Handler Verification
Kiran
Bujji source share