douzhi3779 2014-01-02 01:21
浏览 34


I'm quite new with Yii and I'm dealing with the CGridView which is causing me troubles.

This CGridView is in a renderPartial view.

$this->widget('zii.widgets.grid.CGridView', array(
       <a href="#" class="deleteRate btn btn-danger" data-rateid="\'.$data->id.\'">Delete Rate</a>

Yii::app()->clientScript->registerScript('ratesdeletion', '
$("#ratesProperty").on("click", ".deleteRate", function(e){


', CClientScript::POS_END);

The good part is when I click the delete button, it makes the call to "rates/delete" with the correct id, but when "rates/delete" finishes its work, somehow another AJAX call is made (that I've never coded), please check the screenshot.

Network tab on WebDev Tools

So my questions are:

  1. Why Yii is creating this second ajax call that I've never created?

  2. How can I avoid this second ajax call?


I tried adding an anchor and then attach the ajax call in a click event and it keeps making the second call.

  • 写回答

1条回答 默认 最新


      相关推荐 更多相似问题


      • ¥100 制作短链接和api接口的
      • ¥15 星河亮点sp9500测试指导
      • ¥15 dataframe 某列数据分列
      • ¥15 风扇导入fluent后仿真压力和速度数据卡在旋转域
      • ¥15 echarts中dataZoom报错
      • ¥15 求解答:《前端综合基础》作为一门课程的话,应该包含哪些内容?
      • ¥15 软件原型系统开发+实例测试
      • ¥50 C#上位机调试Win USB
      • ¥15 java基础望榜榜 java基础望榜榜
      • ¥15 comsol 周期性端口