M
M
Messi2016-12-13 18:48:02
JavaScript
Messi, 2016-12-13 18:48:02

How to get submit from ajaxSubmitButton?

Есть форма(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 submit on the form, an alert is triggered.

I need to replace submitButton with ajaxSubmitButton, how do I now in js now determine what was done by submit?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2016-12-13
@Rou1997

Exactly the same, nothing changes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question