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

bokanovsky created an issue. See original summary.

maximpodorov’s picture

Could you try to debug the problem with browser JavaScript debugger?

bokanovsky’s picture

Status: Active » Fixed

There 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).

maximpodorov’s picture

Do you use Drupal behaviors properly (to run your JS code)?

bokanovsky’s picture

Oh! You are right. I was not using Drupal behaviors...
It's working on every requests now, thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.