Yii Framework Forum: Special Characters In Ajax Response - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Special Characters In Ajax Response Rate Topic: ***** 1 Votes

#1 User is offline   winu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 24-February 14
  • Location:Kochi, Kerala

Posted 06 May 2014 - 05:14 AM

��������������������winu


Above shows ajax response in Firebug and I wish to remove � from ajax response. But this special character only generates when I set ajax action to Yii application. Otherwise its working perfectly. This is my controller
class AjaxController extends Controller{
public function actionIndex() {
        $this->render('index');
    }
public function actionGetMore() {
       echo 'winu';
    }
}

below shows ajax code in view page(index.php)
<?php
$basePath = Yii::app()->getbaseurl(TRUE);
?>
<script>
var processing;
$(document).ready(function(){

    $(document).scroll(function(){

        if (processing)
            return false;

        if ($(window).scrollTop() >= ($(document).height() - $(window).height())*0.8){
            processing = true;
           $.ajax({
            type: "POST",
            url:    '<?php echo $basePath.'/index.php/lead/ajax/GetMore'?>',
            success: function(data){
                },
            error: function(){
                }
        });       
        }
    });
});

</script>

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users