How to Periodically Call CHtml::ajax()

I am a newbie to Yii and web development.

I want to call the PHP function from the JavaScript function (see red text).

Can I do this?

If so, how?

Thanks !!






var refreshId = setInterval




    [color=&quot;#FF0000&quot;]// Need CHtml::ajax() call here &#33;&#33;&#33;&#33;[/color]














    // only send element name, not whole form




echo CHtml::textArea(‘ctrylist’, ‘’);

Yes, it will generate a code that looks like:


The only way so far that I figured out to do this is to take the output of CHtml:ajax() and copy and paste it manually back into the code as the call back function in the setinterval method.