How can I refresh a widget?

Hello,

I have a widget that issues an sql to display records.

I would like to have this widget issue the sql every 1 minute.

I am trying to just refresh the table, not the whole page.

Thanks

If you display the records in a CGridView you can use a javascript function with a loop (setTimeout …)

This js-code will refresh the grid.




  $.fn.yiiGridView.update('grid-id');



Thank you