Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I programmatically refresh a view page with AJAX?

I wrote a custom link in my page which created by views module, I want to click it to do something, then the page will refresh by ajax, how do I implement this?

I am sorry I didn't express myself clearly, I use Drupal 7, and the Views module to custom my own page.

like image 200
Olivia Wang Avatar asked Mar 06 '13 15:03

Olivia Wang


1 Answers

You can use this module https://www.drupal.org/project/views_refresh or just use the code below in your JS to refresh the view.

$('.view-dom-id-403402eee35f68cd32fe87b45702dc63').triggerHandler('RefreshView');
like image 76
heshanlk Avatar answered Sep 29 '22 08:09

heshanlk