how to show data on mouseover?

Hello,

On a master record in a list, I need to popup a window that shows the detail record list on a mouseover.

Has anyone done this?

Thanks

I am doing it. :)

By using the ‘title’ html option.

In the grid:


array(

   'name' => 'subject',

   'type' => 'raw',

   'value' => 'CHtml::link(CHtml::encode($data->subject),

      array("view","id"=>$data->id,

      "identifier"=>$data->project->identifier),

   array("title" => $data->description))',

   'htmlOptions'=>array('width'=>'25%'),

   ),



But, it does not really work that well because it ignores formatting.

I think I’ll use this extension instead:

http://www.yiiframew…extension/qtip2

And it should! :) As title text should be format-less according to W3C standards! There is even more problem with them - without exchanging them with some JavaScript plugins, they should not even be multiline (only buggy IE bastard is doing them so).

Extension you mentioned sound really good. On the other hand, I would consider exchanging title attribute with onmouseover one (just the way you do it - using htmlOptions), point to proper JS function and force whole the hard work to JS / jQuery, if this option is possible here.