Chtml::ajaxlink Corresponding Js Script Did Not Generate In First Page Load But It Generated After I Click Refresh Page Button.

Help.

The problem was on the CHtml::ajaxLink.

When the page loaded first time in browser, there have no jquery code generated for this ajax link.

But the jquery code generated correctly after I refresh the page.

The problem still not resolve tho.

this might happened due to browser cache

Too bad, its not the cache problem. It was still the same thing happened. The js script for ajaxLink did not generate in the first time but it generated after I did a refresh in browser.

Here is my code. HELP.

View.php


<UL id="listview">


</<UL>


<?php 

            echo CHtml::ajaxLink('Next 20', array('getMoreRestaurant',), 

                  array('type' => 'GET',

                      'success' =>'js:function(data){

                      jQuery("#listview").append(data)

}',), array('id'=>'link_id_0')); ?>

_ajaxPage.php


<?php

echo "<LI>AJAX</LI>";

?>

Found out why. Jquery mobile will not load the body tag content instead it loads only the id page element.