Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Your module is very useful, thank you.
I'm using it with javascript but the view only refreshes on the first click. All subsequent clicks don't trigger anything.
Any idea how to make the view refresh on all clicks?
$('.refresh-button').on('click', function() {
$('.view-users').trigger('views_refresh');
});
Comments
Comment #2
maximpodorov CreditAttribution: maximpodorov commentedCould you try to debug the problem with browser JavaScript debugger?
Comment #3
bokanovsky CreditAttribution: bokanovsky commentedThere is no error in the browser javascript debugger.
Anyway, I've found the solution.
The view doesn't refresh when I put the button that triggers the function inside the view (ie: in the header or footer area of the view).
But it does work perfectly when I place this button outside the view (in a block or anywhere else).
Comment #4
maximpodorov CreditAttribution: maximpodorov commentedDo you use Drupal behaviors properly (to run your JS code)?
Comment #5
bokanovsky CreditAttribution: bokanovsky commentedOh! You are right. I was not using Drupal behaviors...
It's working on every requests now, thank you!