I'm using Views 7.x-3.11 with Better Exposed Filters and Ajax auto-submit in a panels page, and running into some issues that seem to be stemming from code in
Views/js/ajax_view.js. I want to make the exposed filters bookmarkable, and I also need to deep link to certain result sets. Because of this, I added some custom js to add the selected form parameters to the URL as the user selects them.
I also have a section that lists all the currently active terms, where a user can click to remove them. In order to update the results from here, I'm calling
By default, from here I can see that the
ajax_path for submitting the form has been set to the URL with the query string, which doesn't work. From what I can tell, the native ajax behavior is trying to submit the serialized form data to an already-parameterized URL. To change this behavior, at line 38 of
ajax_view.js I've changed
var queryString = window.location.search || ''; to
var queryString = '';
It's pretty apparent that this is going to cause issues with some sort of intended functionality, but I can't determine what that is. I'm afraid I'm losing sight of something bigger-picture here, or not aware of something about how Views handles ajax submission typically.
Can anyone provide an example of a situation where you'd need the original code? Or what the intended purposed of it is?
Edit: Follow-up question that's a little more practical - is there a way I can make an equivalent change in my custom js that would override the default code in
ajax_view.js, so that I don't need to alter the module?