FAQ Database Discussion Community


Yii2 Pjax not working

yii2,pjax,yii2-advanced-app
I want to refresh the gridview using Pjax but somehow it is not working. Here is the code: _search.php <?php use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\widgets\Pjax; $this->registerJs(" $('#btnAjaxSearch').click(function(){ $.ajax({ type: 'get', data: $('.bank-search form').serializeArray(), success: function (data) { $.pjax.reload({container:\"#bank\"}); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert('error'); } }); return...

Yii 2.0 Class Pjax not found

php,yii,yii2,pjax
Im using Yii 2.0 basic version, i'm trying to use Pjax but the documentation is very unclarifying, I can't uderstand if this widget is already installed with the basic package or if i should install it. I've tried using this on my template: <?php Pjax::begin(); ?> <a href="<?php echo Base_URL;...

Tumblr like button not working after ajax load

javascript,jquery,ajax,pjax
I am using pjax and masonry in my tumblr theme. I just figured out how to get masonry to work after clicking a pjax'd link, but now the problem is that the like button is not working anymore. Here is my code so far: html: <article class="entry" id="{PostID}"> </article> jquery:...

How to update widget with pjax in modal window in yii2

php,ajax,yii2,pjax,active-form
I have two ActiveForms in a modal window and after submitting first form, I need to update second one and stay in modal. As I understand pjax can handle that, but can't get it to work properly. In _form.php I have ActiveForm with widget wich should be updated: <?php $form...

Yii2: Change Gridviews' DataProvider on button click

javascript,php,gridview,yii2,pjax
I have 3 seperate dataProviders for my Gridview, one with Saved data, one with Unsaved data and one with both. Now this is what I'm trying to accomplish: If you click on saved, the dataProvider changes to the one with saved data. I'm trying it like this: <?php if($i ==...

smoothstate.js vs pjax is there a difference

javascript,preloader,pjax,smoothstate.js
I am thinking about implementing a webpage preloader and I am looking at smoothstate.js and pjax. They both seem similar in what they do but I think I am missing something. Is there any major difference between them they I should know before I implement one?...

Yii2 : Search in Gridview using Pjax POST Method with pagination

php,gridview,yii2,pjax
I am beginner to yii2 & trying to search fields in Gridview using Pjax on search button. I have done this with GET method but I want to do this by using POST method. Then how can I do this with Yii2 Pjax(post method) with pagination? Here is my code...

Button not working on Pjax Reload

javascript,php,jquery,yii2,pjax
I am using Yii2 php framework and my page looks like this: Based on the photo, when I click one of the radio buttons, for example "Pending", the GridView would only display all pending reimbursements. The problem is that, in the Action column, the buttons don't work anymore. As you...