CHtml::ajaxLink & disabled javascript

CHtml::ajaxLink works perfectly, but not works if javascript is disabled (and some spiders not understand this construction)… for preventing "bug" I propose render ajaxLink as:


	public static function ajaxLink($text,$url,$ajaxOptions=array(),$htmlOptions=array())

	{

		$htmlOptions['href']=$url;

                // can be opened in new window

                if(!isset($ajaxOptions['url'])){

                        $ajaxOptions['url']='js:this.href';

			$htmlOptions['href']=$url;

		}

                // current logic

		else

			$htmlOptions['href']='#';

		$htmlOptions['ajax']=$ajaxOptions;

		self::clientChange('click',$htmlOptions);

		return self::tag('a',$htmlOptions,$text);

	}

response in case of ajaxRequest:




 if(Yii::app()->request->isAjaxRequest)

   $this->renderPartial('template',$data,false,true);

 else

   $this->render('template',$data);



Qiang, pay attention… now ajaxlink can’t be opened in new window <_< + it’s not friendly (as for me: I rarely use links with “#” or “javascript:void(0);”)