I am trying to access content, that is provided via and can be filtered via a view. I want to load this content dynamically with Ajax. My problem now is, that I can access the view without problems using the following ajax-call:
$.ajax({
url: Drupal.settings.basePath + 'views/ajax',
type: 'post',
data: {
view_name: 'search',
view_display_id: 'block_1',
filterName: value
},
success: function(data,jqxhr) {
$("#ajax-test").html(data)
console.log(data[1])
},
error: function(error) {
console.log(error)
}
});
This works fine, but it ignores the value of filterName (Which corresponds to the according input in the view form). Unfortunately using Better Exposed Filters and Links is not an option since I need to access many filters at once.
Also building an URL like so:
$.get(Drupal.settings.basePath + 'views/ajax/search/block_1/', "filterName[0]=filterValue" ,resultFunction);
did not work for me. Thanks ahead for any pointers!