Hi People…!! I need, e.g, change a <div> each 10 second, and this <div> should show: YES and then (10 sencond ago) show: NO.
I thinks that I should use something like setInterval but I don’t know.
How Can I make my Controll and the view?
Thanks you very much for you help
Yii::app()->clientScript->registerScript('js_interval', <<< EOT_JS
setInterval(function() {
// here refresh div
}, 10000);
EOT_JS
);
Thanks you. But when I want to call the Controller action, I will leave the page where I am and I don’t want that
Yii::app()->clientScript->registerScript('js_interval', <<< EOT_JS
setInterval(function() {
// call controller action
}, 10000);
EOT_JS
);