Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- controller:
- public function actionView($id)
- {
- $post=$this->loadModel();
- $comment=$this->newComment($post);
- $this->render('view',array(
- 'post'=>$this->loadModel($id),
- 'comment'=>$comment,
- ),false,true);
- }
- request:
- CHtml::ajaxLink('Try!', array('view', 'id'=>'9'), array('update'=>'#content'));
- // id 9 only for example
- result:
- <html>
- <body>
- <div id="content">
- <html>
- <body>
- <div id="content"></div>
- </body>
- </html>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement