How To Change Chtml::link In Advanced Search?

in the view, we usually have:


       <?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>

            <div class="search-form" style="display:none">

            <?php $this->renderPartial('/_search'); ?>



My question is the ‘#’ will trigger the class=“search-form” to be displayed. I would like to change it to able to display or hide other class like class =“new-form”. Can anyone show me the way? Thank in advance.

Please your question is not clear!, what do u want, to show/hide two forms (classes) on its click? or just one.

You can use this script

Yii::app()->clientScript->registerScript(‘search’, "

$(’.search-button’).click(function(){

&#036;('.search-form').toggle();


return false;

});

");

so here when button clicks it toggle the form, so can more over here…

I will explain that I made a copy of "Advanced Search" link and put my view inside:


 

       <?php echo CHtml::link('My Search','#',array('class'=>'mysearch')); ?>

            <div class="myform" style="display:none">

            <?php $this->renderPartial('//url here'); ?>



But it not works :)).

Thank you a lot for helping me, I will try it and get back to you later.