Yii Framework Forum: links inside ajax generated list not working - Yii Framework Forum

Jump to content

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

links inside ajax generated list not working Rate Topic: -----

#1 User is offline   Maclein 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 25-April 12

Posted 06 July 2012 - 11:40 PM

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.
0

#2 User is offline   seb 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 240
  • Joined: 29-June 09

Posted 08 July 2012 - 04:11 AM

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).
0

#3 User is offline   James Mj 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 29-August 12

Posted 04 September 2012 - 01:09 AM

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

#4 User is offline   Maclein 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 25-April 12

Posted 08 September 2012 - 06:46 AM

View PostJames Mj, on 04 September 2012 - 01:09 AM, said:

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



Thanks for the reply. Its now working.
Thanks everyone.
1

#5 User is offline   Ankit Modi 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 873
  • Joined: 19-February 13
  • Location:India

Posted 18 March 2013 - 12:01 AM

Thanks for replay it's working...

Best Regards,
Ankit Modi
Thanks,
Ankit Modi
Skype : amodi06
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