Yii Framework Forum: ajaxLink deployed from loaded ajax page - Yii Framework Forum

Jump to content

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

ajaxLink deployed from loaded ajax page Rate Topic: -----

#1 User is offline   dotangelo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 06-April 10

Posted 24 June 2010 - 05:26 PM

Hi!
My problem is, that I load part of my HTML page (div) via ajax request, and in this loaded content I invoke CHtml::ajaxLink.

The point is, that it doesn't work since all this ajaxLink autogenerated stuff like jquery code is not available (or has the same id's like values generated previously on page - where I also use ajaxLink).
How should I fix it ? The only solution ATM is reloading a page.
"Because some things, just need to be improved."
0

#2 User is offline   YorkSEO 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 25-March 09

Posted 25 June 2010 - 06:26 AM

View Postdotangelo, on 24 June 2010 - 05:26 PM, said:

Hi!
My problem is, that I load part of my HTML page (div) via ajax request, and in this loaded content I invoke CHtml::ajaxLink.

The point is, that it doesn't work since all this ajaxLink autogenerated stuff like jquery code is not available (or has the same id's like values generated previously on page - where I also use ajaxLink).
How should I fix it ? The only solution ATM is reloading a page.


You need to make sure you've added a unique id for the ajaxLink in htmlOptions, and in your controller instead of
$this->renderPartial("viewname",array());


do

$this->renderPartial("viewname",array(),false,true); // Processes the output

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