Yii ajaxlink in partial

痴心易碎 提交于 2019-11-30 20:14:33

问题


I'm using Yii framework and have small problem. Then I include to the partial CHtml::ajaxLink, link stopping work as ajax, standart click is raised and performs redirect to another page. Can anyone help me? Thanks.


回答1:


Just a supposition, but turn processOutput on when using partialRender with javascript. It's the fourth parameter when calling renderPartial:

$this->renderPartial('_view',array(params...),false,true)

ProcessOutput allows you to also load javascript when rendering with asynchronous calls or other stuff.




回答2:


Turn firebug on and check for js errors. If there are any, post them here

There was something wrong with yii CHtml::ajax implementation, and it caused me similar bug to yours.




回答3:


Maybe you not finishing document right? try with:

 Yii::app()->end();

And check differences in generated HTML between old version (which worked) and this one. Maybe some js lib not included?



来源:https://stackoverflow.com/questions/6753143/yii-ajaxlink-in-partial

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!