Adding new content to a site via js?

Hey guys,

what I want to do is let the user post a comment and afterwards insert the new comment above the other (old) comments via javascript and synchronously the inserted data to the server.

At the moment my submit button looks as follows:

echo CHtml::ajaxSubmitButton(


                $this->createUrl('comment/update', array('id' => $comment->comment_id)),

                array('update' => '#myDialog',


                array('class' => 'dialog_input_button'));

Is there any extension or something like that from yii, to do that for me? Or whats the best way to do that kind of job?

Thanks in advance guys!


Answered here: