Difference between #4 and #5 of
Update content in AJAX with renderPartial

Revision #5 has been created by Michael Sullivan on Feb 13, 2010, 11:45:47 PM with the memo:

Added note to change accessRules() when adding new controller function
« previous (#4) next (#6) »

Changes

Title unchanged

Update content in AJAX with partialRender

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Content changed

[...]
The actionIndex set myValue to "Content loaded" and this variable is passed to the view "index.php" and to "_ajaxContent.php"

<br />

*Note:  if using accessRules() in your controller file, you will need to modify accessRules() by adding the appropriate part of the function name to a rule set - in this case*  'updateajax'   *like this:*
 
 
array('allow',  // allow all users to perform 'index' and 'view' actions
 
'actions'=>array('index','view','updateajax'),
 
'users'=>array('*'),
 
),
 
 
 
 
#### views/helloWorld/index.php

```php
<div id="data">
<?php $this->renderPartial('_ajaxContent', array('myValue'=>$myValue)); ?>
</div>
[...]
43 0
46 followers
Viewed: 361 157 times
Version: 1.1
Category: Tutorials
Tags: AJAX
Written by: Burzum
Last updated by: hairylunch
Created on: Sep 30, 2009
Last updated: 12 years ago
Update Article

Revisions

View all history