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 !!

<script>

$(document).ready

(

function()

{

var refreshId = setInterval


(


  function()


  {


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


  },


  9000


);

}

);

</script>

[color="#FF0000"]CHtml::ajax(array(

    'id'=&gt;'country_list',


    'type'=&gt;'POST',


    'url'=&gt;CController::createUrl(


             'countries/findallcountries'),


    'update'=&gt;'#ctrylist',


    //'data'=&gt;'js:jQuery(this).serialize()',


    // only send element name, not whole form


    


    )

);[/color]

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

Yes, it will generate a code that looks like:




jQuery.ajax({'url':location.href,'cache':false}); 



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.