Call To Undefined Function

Hi there,

I created a CGridview with several columns and one of those columns I wana call a JS function. I wrote:




columns => array(

   'id',

   'name',

   array(

      'name' => 'status',

       ......

       htmlOptions => array(

          'onclick' => 'test()'

       )

   ),

   .....

)



Of course test() was decleared at the beginning of the page. But I always receive the error that “Call to undefined function …”. I don’t know why

What’s the problem? Thanks

  1. check if "onclick" handler is in fact generated in link…

  2. this might not be the case as in your source htmlOptions is not quoted (by ‘…’ )