M
M
Messi2016-12-13 00:11:29
JavaScript
Messi, 2016-12-13 00:11:29

jquery canceled in yii1 activeform?

There is a form

<?php
    $form = $this->beginWidget('CActiveForm', array(
        'action' => Yii::app()->createUrl($this->route),
        'method' => 'get',
        'id' => 'FindForm'
    ));
    ?>
  // тут еще inputs
                <div class="col-md-6">
                    <?php echo CHtml::submitButton('Find'); ?>
                </div>
    <?php $this->endWidget(); ?>


When I click Submit with ajax, I get a response. But, there is a problem:
When I clicked on Submit for the first time, the get request worked.
The second time I clicked Submit, then the first get request goes, the status is canceled (jquery) and after it comes the second get request that is already working.
The third time when you click Submit, there will already be 2 canceled and the third one will work, and so on, and somewhere on the 16th time a 414 error like a long request flies out.
But when I change submitButton to ajaxSubmitButton the error disappears. What could be the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question