Forums Forums Search & Filter Pro ajaxformfinish wont run my code

Tagged: 

Viewing 10 posts - 1 through 10 (of 19 total)
  • Anonymous
    #227524

    Good day,
    i try to run a jquery code after the ajax run completed but it wont trigger for me.
    We searched the forum for some solutions but teh onces geven wont work.

    Our page is:
    http://ftdev.nl/syntrus-new/huuraanbod/

    we used the following code in the jquery and the plugin is last version.
    $(document).on(“sf:ajaxformfinish”, “.searchandfilter”, function(){
    console.log(“ajax complete”);
    // your code
    });

    Hope u can help me with this.
    Wilco

    Trevor
    #227532

    sf:ajaxformfinish is triggered after the form itself updates from an Auto Count, not when a search is done.

    sf:ajaxfinish is triggered after a search is done. Do you need to use that instead?

    Anonymous
    #227556

    I have tryed both.
    whne i update the filter (change status) i see the following message in my console but not the log.

    jquery-2.2.4.min.js:4 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/.

    I want to trigger some jquery after the filter is changed.

    Trevor
    #227560

    That error message is from jQuery 2.2.4, but WordPress, and our plugin, use 1.12.4. Using other version of jQuery can cause compatibility issues and is not recommended, as jQuery 1.x, 2.x and 3.x are not interoperable. Can you identify why jQuery 2.2.4 is being loaded to your site?

    Anonymous
    #227567

    I have changed the jquery for now have to test all but still get the message from the search & filter change.

    Trevor
    #227573

    You still see this error message?

    jquery-2.2.4.min.js:4 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/.

    Are you able to send me a live link/URL to your search page so I can take a look?

    Anonymous
    #227642

    the error is now:
    jquery-1.12.4.min.js:4 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

    This is the link to the search page. on top u see the filter if you click on “lijstweergave” u see the result.
    http://ftdev.nl/syntrus-new/huuraanbod/

    Anonymous
    #227782

    Is this enough info or do you need more to help me out?

    Trevor
    #227795

    The issue in that warning message will not stop the filter from working.

    Can I see the actual code you used, as the code you first showed me will not actually do anything, it is simply an empty container in to which to put your own code?

    Is it being loaded inside an external file? If so, which one?

    Anonymous
    #227800

    this is what i use to test it.

    $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    	    console.log("ajax finish");
    	    // your code
    	});
    	$(document).on("sf:ajaxformfinish", ".searchandfilter", function(){
    		console.log("ajax complete");
    		// your code
    	});

    Both are in my script.js file

Viewing 10 posts - 1 through 10 (of 19 total)