Yii2 Pjax and ActiveForm beforeSubmit not working after reload?

前端 未结 2 1776
礼貌的吻别
礼貌的吻别 2021-01-21 04:49

I am creating a loading indicator on my submit button and attaching the \"start\" procedure to the beforeSubmit event using the registerJs function.

It works properly th

2条回答
  •  甜味超标
    2021-01-21 05:46

    This problem occurs for several reasons.

    Firstly, Any code placed within $(document).ready(); and loaded on the ajax called page (contained page) will not be executed after it is loaded.

    Secondly, any references to external scripts (

提交回复
热议问题