All javascript won’t work after Pjax reloads in Yii2

posted in: Yii2.0 framework

Yii version 2.0.13.1 When you work with Pjax either Pjax jquery or Pjax module, you may face the same issue as me. I am working on the Pjax widget in Yii2.0. The widget uses Pjax jquery. ProblemEvery time the Pjax reloads, all js that attached to DOM in Pjax container won’t work. CauseAfter Pjax finishes reloading, the js that set to DOM in Pjax container will not pick up on these changes. SolutionYou must reinitialize the js to DOM after … Read More

Pjax is not working, reloads the whole page

posted in: Yii2.0 framework

Yii version 2.0.13.1 Recently I am working on building the custom application with Yii2.0. I have one issue with Pjax widget. It turns out to be a common issue when you are working on Pjax. ProblemI want to render the creating form in the modal on an index page. After users submit the form, the modal will be closed and the grid view will be refreshed. This way, users won’t leave the index page. The problem is Pjax reloads the whole page … Read More