Skip Navigation

[Résolu] ajax search results not updating without submit

This support ticket is created Il y a 11 mois et 1 semaine. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par Waqar Il y a 11 mois.

Assisté par: Waqar.

Auteur
Publications
#2676559

Tell us what you are trying to do? results should update as user types in search field

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site? lien caché the form is split on a divi theme page, with query in one column and results in another.

#2676574

Hi,

Thank you for contacting us and I'd be happy to assist.

I tried to see the search, but it is behind a 'Maintenance mode' page. Can you please share temporary admin login details, so that I can see how this view is set up?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2676583

ps, this site is a clone so it's ok to make changes.

#2676831

The access details worked, thank you.

I'll be performing some tests and will share the findings, as soon as I can.

Thank you for your patience.

#2677101

Thank you for waiting.

During testing, I was able to make this work using the following script:


jQuery( document ).on( 'ready js_event_wpv_pagination_completed js_event_wpv_parametric_search_form_updated js_event_wpv_parametric_search_results_updated', function( event, data ) {
    jQuery('input[name="wpv_post_search"]').change( function() {
      	  /* execute only if the typed characters are more than 3 */
           if( this.value.length < 3 ) return;
      		jQuery(this).parents('form:first').trigger( "submit" );
        });
});

You can see it working on your website and it monitors the changes in the search field and if 3 or more characters are typed, submit the search form automatically.