As seen in the title I am looking for a solution to above question. I have the following button:
<input onclick="setRefreshTimer();" type="button" value="10 Seconds">
And below the function. This one sets a certain time to the refresh timer (in the example 10 seconds) so that the default value of 30 seconds is overwritten.
function setRefreshTimer() {
Yii::log("I am not certain if I was here!");
CHtml::refresh(Yii::app()->config->set('DASHBOARD_RELOAD', 10));
return CHtml::refresh(Yii::app()->config->get('DASHBOARD_RELOAD'), $url);
}
What I need now is a solution on how to call the function when the button is clicked. The code above is what I have tried so far but it does not seem to work correctly and I can't seem to find the reason for this.
Any help, advice and/or hint on how to solve/improve this issue is very welcomed.