Pop Up A New Windwon In Gridview

I have a grid view column name "record", I would like to click the record and pop up s new small window to display the detail of the record. I have read the classroom example a lot of times but i did not find the way



'type' => 'raw',





The above code works but doesn’t show in a new window.

Can someone help me? Thanks

check something like that



                 onclick'=>"MyWindow=window.open('http://www.yourlink.com','MyWindow','toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,width=300,height=300'); return false;"



Thanks Konapaz! I tried, but it doesn’t work

Now, the window.open is not recommend. Because many web browser’s default set is prevent it.

You can use CJuiDialog in Yii framework , for example:


  $this->beginWidget('zii.widgets.jui.CJuiDialog', array(


      // additional javascript options for the dialog plugin


          'title'=>'Dialog box 1',





      echo 'dialog content here';




  // the link that may open the dialog

 echo CHtml::link('open dialog', '#', array(

     'onclick'=>'$("#mydialog").dialog("open"); return false;',



You have to be careful (I had too) with quotes and double quotes. (it was a little complicated)

The previous post was an example without checking, Now I tried it in my test project and works fine!

Just paste this code in your CGridview and you will see that works! :)



			'type' => 'raw',


								array('onclick'=>'window.open(\'http://www.yourdomainlink.com\',\'mywindow\',\'status=1\'); return false;'