These are chat archives for collectiveaccess/support

Aug 2016
Aug 31 2016 11:19

I am using ajax requests on some html components in one of my search views in Pawtucket2. Ajax calls another view in the same directory (views/Search), however requests are returned with a view containing header and footer. How can I integrate ajax calls in views and receive response without header and footer?
I have a drop down box in advanced search view (/views/Search/ ca_objects_advanced_search_objects_html.php). When an item in the drop down box is selected an ajax request to selection.php is made. Code in selection.php does some processing on the ajax request and returns some data that will be used to populate some additional html components in advanced search view. Ajax call is successfully made to selection.php, however response of the request contains a full view with header and footer.


Aug 31 2016 13:49
The header and footer should be automatically omitted for ajax request. Do your ajax requests include a HTTP_X_REQUESTED_WITH header set to XMLHttpRequest?
You might also try setting a query string parameter named "download" to 1
and see if that gives the desired results. It's an alternate way of suppressing headers and footers.
@babslgam Can you be more specific about what you're trying to do, and with which service?