Forums › Forums › Search & Filter Pro › ajax loading not working
- This topic has 7 replies, 2 voices, and was last updated 10 years, 6 months ago by Ross.
-
Anonymous(Private) May 20, 2014 at 5:28 pm #767
I have a search form in my sidebar, and I have set the results to be displayed in the #content area. But when I click the Submit button, the #content area goes grey, then comes back, but no search results.
Site URL: http://bit.ly/1klHXPJ
Screenshot of settings: http://bit.ly/1k2zi4VCan you help?
Ross Moderator(Private) May 20, 2014 at 7:20 pm #768Hey Amin
I just had a look… it looks like the page you have got your search form on is different to your results page?
They need to match.
This is the page your AJAX is calling for results:
http://dev.venuejar.com/?_sft_ait-dir-item-category=community-league&sfid=z7&sf_ajax_timestamp=1400609701205Which looks correct, but it is a completely different layout to the one you have your search form on (the link you provided).
The best thing to do would be to enter a slug for your results (ie “test-2”) like you have so then you could access your search results page or change the page template (where it says “search.php” to match the template being used on this page – http://dev.venuejar.com/test-2/ (it is not search.php)..
Does that make sense?
Ross Moderator(Private) May 20, 2014 at 7:23 pm #769One more thing to note is, its always good to test with AJAX off first, to make sure everything behaves as expected and then enable AJAX after (maybe you did this already just giving a recommendation)..
Thanks
Ross Moderator(Private) May 20, 2014 at 7:48 pm #772Hey Amin
Sorry I should explain a little better (I am actually working on setting up an example so I can do a video tutorial of how to set this all up properly, but that won’t be ready until later tonight or tomorrow).
From what I can see, your search results page does not have the Search Form on it, so there is no way to see if Ajax is working. When I go to –
http://dev.venuejar.com/test-3/
I should see your search results (unfiltered), and the search form, but no search form is present…
You have the search form at the top (the top bar with locations & categories), but this is not a Search & Filter search form, so it is not integrated with Ajax or hte plugin in any way.
You should update your template
search.php
so that it does contain your sidebar, then you will see that the search form will work with Ajax…Does that make sense? If you want send me your login details and I’ll have a quick look around! (mark your messages as private of course)
Thanks
RossRoss Moderator(Private) May 20, 2014 at 8:20 pm #774No worries glad you got it working! I really should get this tutorial finished to make life easier 😉
-
AuthorPosts