ajaxSubmitButton works as normal submitButton


I’m trying to submit a form using ajaxSubmitButton, but instead it submits as if there was a normal submit.

Here’s the code from the view file:


    $form = $this->beginWidget('CActiveForm', array(

        'id' => 'msg-messages-index-form',

        'enableAjaxValidation' => false,





    <?= $form->errorSummary($replymessage); ?>

    <div class="row rel-container replymessagetext">

        <?= $form->textArea($replymessage, 'text', array('class' => 'overlayed')); ?>

        <?= $form->label($replymessage, 'text', array('class' => 'label-overlay')); ?>


    <div class="row buttons replymessagebuttons">






                   'update' => '#' . $thread_id . ' .replyform',

                   'type' => 'POST',


             array('class' => 'greybutton')




    <?php $this->endWidget(); ?>

I’ve been stuck with this for couple of hours now and just can’t find what’s causing this problem.

What could be wrong here?

My content that contains ajaxsubmitbutton was also being loaded with ajax request.

Solved using this tip:


I simply overrode renderPartial method in my controller:

public function renderPartial($view, $data = null, $return = false) {

    CController::renderPartial($view, $data, $return, true);