0

I am very novice to Yii.There is a view file absence.php which submits data of a CActiveForm to a controller file personal.php inside of which there is a public function createabsence() which does everything: server validation, communication with the database and message handling.

<?php 
$form=$this->beginWidget('CActiveForm',['id'=>'createAbsence','enableAJAXValidation'=>true]);
...
echo CHtml::submitButton('GO');
$this->endWidget();
?>

The above code is part of the view file; everything works fine. Form data passes to the controller and I am getting a response from the server. My problem is that the call to the controller is not an AJAX call and I have no idea how to convert this call to an AJAX call. Of course I know how to do that when dealing with something usual, however I do not know what I have to add/change in Yii.

Thank you

Unknown developer
  • 5,414
  • 13
  • 52
  • 100

1 Answers1

1

Use AjaxSubmitButton

This link

is related to ajaxsubmit.

Hope it helps you

Community
  • 1
  • 1
Dhara
  • 1,431
  • 4
  • 29
  • 47