HTML5 Pushstate for query Strings in search
-
Hi I am helping to customise the petsitter theme for a final installation on https://activlist.co.uk I have installed a dummy site while developing https://wuwoclientlindsay.wuwomedia.com/activelist_demo/activlist_providers/ I have setup a child theme on top of PetSitter
I have 3 interrelated problems with the query string functionality in the ajax search:
The first is when I do any type of search from the above dummy site listing page, it has a hash fragment query at the end but it is always set to s=1 ,is there any way to turn on a custom query string for the ajax searching?
The second, is there any way to use HTML5 pushstate to keep a track of the history and allow users to click back through their searches? As per something like this article https://www.frontendjournal.com/html5-pushstate-and-single-page-apps/
The Third is there a way to hook into the ajax event, or listen for it so I can trigger a call to google analytics whenever an ajax search takes place.
###
You will notice I have already used
jQuery('.job_filters').trigger('update_results', [1, false]);
In an inline script at the top of the /job_manager/job-filters.phpI am considering either a dirty hack on the XMLHttpRequest prototype as here https://stackoverflow.com/questions/4406606/can-jquery-listen-to-ajax-calls-from-other-javascript
or overwriting the form at /job-manager/job-filter-job-types.php
I am prepared to roll my own on all these features but wanted to check with you first in case there is something I am missing.
Warmest Regards,
Lindsay
- The topic ‘HTML5 Pushstate for query Strings in search’ is closed to new replies.