Hi there!
I’m not sure if you’ll be able to help me or not, but this is my issue. I need to be able to force my page to reload after a certain amount of time. Following is the code I have to do this.
I have a meta tag to refresh the page:
<meta id="refresh" http-equiv="Refresh" content="60; URL=https://www.ddfl.org/adoption/">
And then when the buttons are clicked for the filter I update the URL portion of the content attribute so that it will be the URL with the filtered values in it (i.e., https://www.ddfl.org/adoption/?_sfm_animal_type=Cat). This is the code I have to do that:
(function($){
$(document).ready(function() {
$('.sf-input-radio').click(function() {
var currentURL = window.location.href;
console.log(currentURL);
var content = '60; URL=' + currentURL;
// document.getElementById("refresh").setAttribute("content", content);
$("#refresh").attr("content",content);
});
});
})(jQuery);
The problem is, it will only return the base URL https://www.ddfl.org/adoption/ and will never update it with the filter values. I believe this might be because I am calling this on the radio button click and so maybe the ajax request has not completed and actually updated the URL yet. Is there a way for me to set an action after the url is updated with ajax?
Thank you for your help!!
Kristin