Forums › Forums › Search & Filter Pro › Ajax not working in the first search
Tagged: ajax
- This topic has 11 replies, 3 voices, and was last updated 8 years, 8 months ago by Ross.
-
Anonymous(Private) February 15, 2016 at 3:47 pm #37007
Hi Ross,
In my website, Ajax feature not working in the first search. After the selection of the first search item field, the system working as normal with page refresh, thereafter ajax working fine. Moreover when I click All Cities, system not loading all the listings.
Please look in to this and give me solution asap.
Regards
FaasAnonymous(Private) March 7, 2016 at 2:49 am #38786I have had to disable Ajax for the moment as it simply does not function correctly.
But would appreciate any feedback. My customer is in Singapore so anytime during the day after 10am would be a good time to test/resolve if that is possible. It’s been working fine for months!!Ross Moderator(Private) March 7, 2016 at 10:35 am #38815Hey Philip
Can you open a new ticket, and follow up on that with a private reply &link?
Thanks
Ross Moderator(Private) March 9, 2016 at 1:25 pm #39065Faas
I see your issue – basically after the new content is loaded in, your javascript is not re-initialised, like it would be on page load/refresh – please see this recent reply:
https://support.searchandfilter.com/forums/topic/page-reloads-after-filtering-results/#post-38556
Absolutely.
The issue here that you are using Ajax.
IF you disable ajax, the compare button will work as normal?
This is because, when an ajax search is submitted, new HTML/results are fetched and loaded in.
But, the Javascript for your compare button does not get applied to this new html/elements.
To get around this we provide a JS event, which tells you when the ajax request has completed, and then you can load / reload your javascript again for functionality like this.
Please see hte first question on the FAQs – https://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/
Thanks
-
AuthorPosts