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="#FF0000"]// Need CHtml::ajax() call here !!!![/color]
},
9000
);
}
);
</script>
[color="#FF0000"]CHtml::ajax(array(
'id'=>'country_list',
'type'=>'POST',
'url'=>CController::createUrl(
'countries/findallcountries'),
'update'=>'#ctrylist',
//'data'=>'js:jQuery(this).serialize()',
// only send element name, not whole form
)
);[/color]
echo CHtml::textArea(‘ctrylist’, ‘’);