Menu
  • HOME
  • TAGS

Yii2 Pjax not working

yii2,pjax,yii2-advanced-app

Thanks Edin. It helped me to solved the problem. Here is what I did. It might help someone facing the same problem. As Edin mentioned you need to pass the url along with the search parameters to the Pjax in order to refresh the gridview. Here's my edited code :...

How to update widget with pjax in modal window in yii2

php,ajax,yii2,pjax,active-form

Managed without $.pjax, just added this $("#risks-solutions_order-sortable").append('<li data-id="'+data.id+'" data-key="'+data.id+'" draggable="true">'+data.solution+'</li>'); $("ul[id$='sortable'").trigger('sortupdate'); $('#risks-solutions_order-sortable').sortable( "refreshPositions" ); in ajax success and everything is ok! :)...

Yii2: Change Gridviews' DataProvider on button click

javascript,php,gridview,yii2,pjax

If I understood properly you don't need 3 dataProviders. You should use GridView's FilterSelector option to treat that external element as part of GridView's filter. For example echo GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterSelector' => "input[name='ModelSearch[_selection]'],", ... Then, in your Filter Model you filter depending on that value...

Installing Laravel PJAX

php,laravel,pjax

Try to change that last line to JacobBennett\Pjax\PjaxMiddleware::class ...

smoothstate.js vs pjax is there a difference

javascript,preloader,pjax,smoothstate.js

I'm no expert, but while both handle the post event via AJAX, I think smoothState.js has more of an emphasis on creating animated transitions. smoothState.js gives you access to three functions that allow you to easily insert animations into a page load, making the transition completely smooth: onStart - Run...

Yii 2.0 Class Pjax not found

php,yii,yii2,pjax

Pjax widget is included by default, no need to additionally install it. Your problem is related with namespaces. Either specify full namespace in use section: use yii\widgets\Pjax; and then use it as Pjax. Or specify full namespace with leading back slash like so: \yii\widgets\Pjax. Using first option most of the...

Can I manually navigate with turbolinks in Rails?

ruby-on-rails,pjax,turbolinks

From the Turbolinks Readme: You can use Turbolinks.visit(path) to go to a URL through Turbolinks. ...

Button not working on Pjax Reload

javascript,php,jquery,yii2,pjax

I figured it out. Here's my updated code: HTML <div class="table-responsive all"> <?php \yii\widgets\Pjax::begin(['id' => 'reimbursement_grid']); ?> <?php echo $this->render('_index', ['dataProvider' => $dataProvider ]); ?> <?php \yii\widgets\Pjax::end(); ?> </div> JAVASCRIPT <script> //$(document).ready(function(){ $(document).on('ready pjax:success', function(){ $('input[type=radio]').prop('name', 'filter'); var showAll = $('input[name=filter]').val(); if(showAll == "Show All") {...

Tumblr like button not working after ajax load

javascript,jquery,ajax,pjax

I believe you need to use pjax:success. This should give you the data object. $(document).on('pjax:success', function( event, data, status, xhr, options ) { $('#content').imagesLoaded(function(){ $('#content').masonry('reloadItems').masonry(); }); var $newPosts = $(data).find('.entry'); var $newPostIDs = $newPosts.map(function () { return this.id; }).get(); Tumblr.LikeButton.get_status_by_post_ids($newPostIDs); }); Source: https://github.com/defunkt/jquery-pjax#events...

Yii2 : Search in Gridview using Pjax POST Method with pagination

php,gridview,yii2,pjax

Try using post method of Pjax: $.pjax.reload({url: url, method: 'POST', container:'#bank-grid'}); ...