Yii2: Processing jQuery Ajax

This is skeleton code example on posting form data in JSON format processing by Yii’s controller action. Although this example uses Yii, the code can be easily adaped to pure PHP …

Yii2: Include View Specific JavaScript

To include JavaScript for specific action, either the JavaScript code or file is to be registered in view file. Method 1: Register JavaScript File Use registerJsFile(). Note: optional position. values: POS_HEAD, POS_BEGIN, POS_END. …

Yii2: Ajax Gridview

Want to navigate through the grids or trying to sort and filter data without waiting for the entire page to load? You need yii\widgets\Pjax and wrap it around GridView. In the view: …