links inside ajax generated list not working

Hello guys,

I am using fancybox extension in yii. There is a div containing links to open fancybox. At this point fancybox is working perfectly. In my code ajax is updating this div’s content and generating the same links to open fancybox. But after updating the div’s content the links to open the fancybox is not working.

What am I missing? Please save me. Its killing me.

I didn’t use fancybox, but here is a guess: links are handled by javascript and after you update html the javascript is not returned.

The solution can be whether use something like jQuery live() or delegate() method to bind javascript handlers or use renderPartial method with prpcessOutput parameter set to true, like renderPartial("view", false, true).

add Yii::app()->clientScript->scriptMap[’*.js’] = false; before renderPartial .

Thanks for the reply. Its now working.

Thanks everyone.

Thanks for replay it’s working…

Best Regards,

Ankit Modi