Forums › Forums › Search & Filter Pro › Ajax auto submit
- This topic has 8 replies, 2 voices, and was last updated 10 years, 6 months ago by Ross.
-
Ross Moderator(Private) May 21, 2014 at 1:14 pm #790
Hey Tim
What happens exactly, you change the dropdown, the results update via ajax, then you change the dropdown again and nothing happens?
Can you verify everything is working ok without auto submit? ie, disable autosubmit, but enable AJAX… then check, does the AJAX work fine using a submit button?
If you have a link that would be really handy! (you can mark replies as private if you need).
Thanks
RossRoss Moderator(Private) May 21, 2014 at 1:37 pm #792Hey Tim, its seems as though the search functionality is working fine, and even the Ajax is working fine for 1 or 2 submits…
So the next logical conclusion I can take from that is that it is in fact a JavaScript error…. have you tried looking at the console (using firebug for example) to see if any errors are being generated when you submit the forms?
If one JavaScript error is thrown all subsequent JS will not work properly, so it seems like after a certain amount of time, or depending on submits/refreshes that there is a JS error generated.
Check the console and report back any errors you find ๐
Ross Moderator(Private) May 21, 2014 at 2:17 pm #796Hey Tim, no idea about this one! I doubt it has anything to do with AJAX, but this could be a separate issue…
I’ll try to do a test with that plugin and S&F and see. In the meantime let me know of any updates you may have with the AJAX refresh.
Sleep well haha!
Ross Moderator(Private) May 22, 2014 at 12:00 am #803Hey Tim, a couple of bits of good news for you ๐
1) There was a conflict with Custom post type UI – we are both using the same menu position in our plugin, so one will be shown and one will be hidden… I will email you an updated file with this fix..
2) Your Ajax only working once… I was just setting S&F again on another site and ran in to this exact issue (well its not an issue, just an oversight on my part). Essentially it was the content selector I was using to load results (
#content
).The default setting of
#content
*seemed* to work ok but I was getting the same problem as you. The problem is the selector is supposed to target your content area only (ie your list of posts/results) – your search widget is not supposed to be inside this selector otherwise there will be problems.For my woocommerce setup I changed this to
#main
and it worked fine – this is because thediv
with the ID of#main
did not include the search widget itself.Hope that makes sense? ๐
-
AuthorPosts