I'm looking how to handle in Yii somenthing similar to ActivePanel in Prado. I need to handle an update of a div inside the page during and ajax exent. Badically I would like to render only a part of view. I don't know how to do it in that framework.
If it's possible maybe I need to create a specific widget "ActivePanel"...
I don't know.
Page 1 of 1
Active Panel equivalent
#2
Posted 08 October 2008 - 09:00 AM
There is an CHtml->Ajax() method, I believe passing this method the result of CControl->renderPartial() may do the trick..
But I may be very incorrect
nz
But I may be very incorrect

nz
#3
Posted 08 October 2008 - 09:18 AM
If you read jQuery docs, you will find that updating a div via AJAX is very easy.
CHtml::ajax is a wrapper of jQuery's AJAX support.
CHtml::ajax is a wrapper of jQuery's AJAX support.
#4
Posted 08 October 2008 - 12:35 PM
I found how to update a div... I need to find how to execute js on client side like part of this process. Maybe I need only to send a
<script language="javacript">
myFunc();
</script>
Instead of pure HTML like I'm doing now.
<script language="javacript">
myFunc();
</script>
Instead of pure HTML like I'm doing now.
#5
Posted 08 October 2008 - 12:44 PM
Using CHtml, this can be done simply as follows:
Of course, you can also use jQuery directly.
echo CHtml::script(
CHtml::ajax(array(
'url'=>'/path/to/yourAction',
'update'=>'#divID',
))
);
Of course, you can also use jQuery directly.
Share this topic:
Page 1 of 1