Registerscript And Yii Controller Action


my view is:



<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ads-inter.css" type="text/css" media="screen" charset="utf-8" />


<div id="intermission">

	<div id="lb_header">

	    <div id="lb_wrap" >

	        <a href="<?php echo Yii::app()->request->baseUrl; ?>" target="_blank" class="lb_link left"><img src="<?php echo Yii::app()->request->baseUrl; ?>/css/img/el.png" border="0"></a>

	        <div style="float:right;display:inline-block;">

				Please wait...<span id="redirectin"></span>







Yii::app()->clientScript->registerScript('topBanner', "			

$('intermission').ready(function() {

var ctr = 1;		

var rr = function() {

if(ctr > -1 ){




var skip_ad = $('<div class=\"skip_btn\"><a href=\"#here my action\">SKIP AD >></a></div>');

$('div span#redirectin').parent().css('margin', '2px').html(skip_ad);



var si = setInterval(rr, 1000);		





in <a href=\"#here my action\">SKIP AD >></a> i want to execute a yii action test/skipad how i can do that?


Dear friend

Kindly check by adding the following.


thanks seenivasan :) how i can send a parametre? befor clicking skip ad i have a url like this /index.php?r=test/index&url=NSR and i want also send url to the controler action ?

Dear abeel

By default in YII we can bind the GET values as parameters to controller actions.

In your case you can customize the TestCcontroller::actionIndex

public function actionIndex($url)


     // Do something here with $url.