I have problem with using ajax in forms.
<?php
$this->form = $this->beginWidget('CActiveForm', array(
'id' => 'node-form',
'enableAjaxValidation' => true,
'enableClientValidation' => true,
'clientOptions' => array('validateOnSubmit' => true),
'htmlOptions' => array('enctype' => 'multipart/form-data'),
));
echo $this->form->hiddenField($this->node->nodeType, 'id');
?>
<div class="row">
<?php echo $this->form->labelEx($this->node, 'name'); ?>
<?php echo $this->form->textField($this->node, 'name', array('size' => 60, 'maxlength' => 255)); ?>
<?php echo $this->form->error($this->node, 'name'); ?>
</div>
<div class="row">
<?php $this->generateField('Obrazek'); ?>
</div>
<div class="row">
<?php $this->generateField('Opis'); ?>
</div>
<div class="row buttons">
<?php echo CHtml::ajaxSubmitButton($model->isNewRecord ? 'Create' : 'Save', 'admin/content/update/' . $this->node->id); ?>
</div>
<?php $this->endWidget(); ?>
When i submit form ajax is not used. Javascript is enabled because this form is loaded to jquery dashboard widget. Is it possible that this is the reason of this problem?
Ok I know that it is because form is loaded to dashboard. Is there way to load javascript for ajaxButton/ajaxSubmitButton with form?