Ajaxlink Not Working

Hello Everyone,

   I have problem in ajaxlink. my code is





    $action = controller/action;       





    $var .= CHtml::ajaxLink($rt,array($action),array(// ajaxOptions


                                        'type' => 'POST',


                                        'DataType' => 'json',


                                        'success' =>"js:function(data)


                                         { 


                                              $('div .message_container').html(data); 


                                              var str = data;


                                              var n = str.charAt(40);


                                              $('#rpt .ext').html(n);


                                              $('#rpt1 .ext').html(n);


                                         }",


                                        'data' => array('val1'=>$dr['user_id'],'val2'=>$mn['log_id']),


                                        )); 


   echo $var;


   exit;








   In controller i make one view and send to view using jquery but ajaxlink  url is not working in view.


   means action is not called from view.

[color="#556B2F"]/* Moved from "Bug Discussions" to "General Discussion for Yii 1.1.x" */[/color]

Make the action url like this

$this->createUrl(‘controller/action’),

check this action is defined in access rules on that controller…

check jquery is defined in the top.

and check with url and errors in error console with firebug