1
votes

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.

3
Check to make sure the action is getting called properly - instead of renderPartial, have it return some text and exit. If that doesn't work, it's probably a js issue. Check your rendered HTML to see if anything is amiss.ldg

3 Answers

5
votes

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.

0
votes

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.

0
votes

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?