There is a form (yii1)
$form = $this->beginWidget('CActiveForm', array( 'action' => Yii::app()->createUrl($this->route), 'method' => 'get', 'id' => 'MyForm' )); ?> <div class="col-md-3"> <div class="row"> <div class="col-md-6"> <?php echo CHtml::submitButton('Find'); ?> </div> </div> </div> </div> <?php $this->endWidget(); ?> И файл js $('#myForm').submit(function(){ alert(1); }); When I click send on the form, the alert is triggered.
I need to replace submitButton with ajaxSubmitButton, how can I now determine in js what was done by submit?