Goto Url On Clicking Link In Cautocomplete

I am using CAutoComplete in Yii application.

I am trying to return links based on search query. I am able to return that also.

Now if I will click that link whole link is copied to the search bar. How to goto url on clicking the link?

Code :

Controller -


$products = Product::model()->findAll();

foreach($products as $product) {

    $return[] = CHtml::link($product->name,array('product/view','id'=>$product->id));

}

echo implode("\n",$return);

View -


$this->widget('CAutoComplete', array(

    'name'=>'search',

    'value'=>CHtml::encode(Yii::app()->request->getParam('search')),

    'url'=>array('ajax/suggestProducts'),

    'multiple'=>false,

    'selectFirst'=>false,

    'htmlOptions'=>array('placeholder'=>Yii::t('main','Search Products'),'id'=>'searchbar')

));